Hi, i’m trying to create a web page where i print ...
# box-products
n
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
@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
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
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
whoops! didn’t consider this at all, thank you so much
n
@david.kreimer thank you so much
d
no problem. @bdw429s answered this same question for me a few years ago. what a blessing 🙂
m
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
<cfsetting showDebugOutput="false"> or setting showDebugOutput=false.
m
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
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
@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
@Scott Steinbeck Hi, by coldfusion administrator you can stop debugging on the whole server, we have to stop it just for this project