http://coldfusion.com logo
#box-products
Title
# box-products
n

Nicole Liliana

03/25/2022, 1:58 PM
Hi, i’m trying to create a web page where i print user’s products. i take the records from the db and then i use
Copy code
arrayList = queryToArray(queryexecute("select id.... from products... where userid = ?"));

var returnArray=[];
for (i=1;i<=ArrayLen(arrayList);i++){
    arrayAppend(returnArray, populator.populateFromStruct(target=getInstance('userProduct'), memento=arrayList[i],trustedSetter=true,ignoreEmpty=true));
}

return returnArray;
to create an array of objects and i use it to print data on the page in the test the code use 1s to populate 10 object with this code am I wrong in using the function?
d

Daniel Mejia

03/25/2022, 4:31 PM
@Nicole Liliana looks fine to me. Your "returnArray" is an array of
userProduct
objects. Now you can loop through this array and use the getters to output data.
Are you having trouble printing the data?
m

Marco Liverani

04/07/2022, 9:54 AM
Hi @Daniel Mejia I’m a colleague of Nicole and we’re working at the same project. We’re trying to understand why Wirebox need to spend so much time (up to 50ms) to create every single instance of the objects. We have a quite simple model with some properties and a couple of dependencies. Maybe it’s the DI that costs a lot in terms of time? What can we do to improve performance?
1
d

david.kreimer

04/07/2022, 1:56 PM
have you disabled debugging and more specifically the execution time metric collection in cfadmin?
👍 1
👍🏾 1
try your request with
?__cf_nodebug=true_
👍 1
m

Marco Liverani

04/07/2022, 2:26 PM
whoops! didn’t consider this at all, thank you so much
n

Nicole Liliana

04/07/2022, 2:44 PM
@david.kreimer thank you so much
d

david.kreimer

04/07/2022, 2:55 PM
no problem. @bdw429s answered this same question for me a few years ago. what a blessing 🙂
m

Marco Liverani

04/11/2022, 9:10 AM
It seems that the _cf_nodebug parameter works only if sent via url, I’m trying to set it in my code but I still see the debug in my request. Is there a way to force it programmatically?
r

Rodney

04/11/2022, 12:43 PM
<cfsetting showDebugOutput="false"> or setting showDebugOutput=false.
m

Marco Liverani

04/11/2022, 12:46 PM
yeah, I know this let me hide or show the debug results at the bottom of the page, but it doesn’t disable the debug execution itself
r

Rodney

04/11/2022, 2:00 PM
That will stop debug output programmatically, regardless of the type of request, which is what you asked for. It was used incorrectly, if you are still seeing debug output.
Otherwise, you can try the cfadmin tag, Lucee only.
n

Nicole Liliana

04/11/2022, 2:46 PM
@Rodney I’m a colleague of Marco, we need it for Adobe Coldfusion
in the cfadmin there is a debugging settings page on the left side. Here you can customize what debugging you want run on every page request
n

Nicole Liliana

04/12/2022, 7:52 AM
@Scott Steinbeck Hi, by coldfusion administrator you can stop debugging on the whole server, we have to stop it just for this project