Is there a way to get better performance out of Wi...
# box-products
b
Is there a way to get better performance out of Wirebox? I downloaded ColdBox 6.8, cloned Luis' API Example from the latest dev week, modified the RantService
list()
function to just call
wirebox.getInstance("Rant@v6")
100 times, and it takes about 1500ms (not including any framework init processes). Alternatively, is there a way to inject mementifier and cbvalidation functionality into an object without using Wirebox?
b
@Brandon Edwards 15ms per creation seems a little high, but not outrageous. Can you use the FusionReactor profiler to find out the slowest part of what it's doing?
b
I don't have FusionReactor, but manually timing code blocks in getInstance() the line
var target = variables.scopes[ mapping.getScope() ].getFromScope( mapping, arguments.initArguments );
takes about 80% of the time spent in getInstance(): 1428ms when getInstance() in total takes up 1801ms. I was curious what mapping.getScope() returns - 1 NoScope, 100 noscope, 202 singleton. With 1801ms total time in getInstance(), 1464ms of that is when mapping.getScope() is "noscope". Not sure how useful this will be - if I can't vastly improve the performance of Wirebox, I can't use it. Even 300ms response time for a "page" of 100 objects is a lot.
b
That doesn't really tell anything. Pretty much all the logic of inside of getfromscope(). FR will take you to a new level 😀
A developer license is pretty cheap
@Brandon Edwards Check this out

https://www.youtube.com/watch?v=kr9MmMlpPnQâ–¾

If you spend more than a few hours on this, you've paid for your FR developer license