I have started implementing Wirebox into our legacy code and in a few parts where there are objects with a deep hierarchy of dependencies where the objects get created inside of loops, our application slows down significantly due to scoping.
For example I was able to shave off 20 seconds worth of application time by going in and scoping all of the variables that were showing up in the implicit variable access table in the Lucee debug output. The main culprit that I have seen in the debug output in my particular case is the "instance" variable that is used everywhere. By prefixing "variables" to it there was a significant performance increase.
Is there any side effects other than making the code ugly that could come from scoping everything? I would be willing to go through myself and scope everything if you guys could see the benefit. I don't really like the idea of modifying the core since it would break with updates in the future which is why I am hesitant to even implement the changes on production.
Hi we are currently using Wirebox as a standalone product. I have tried both with debugging on and off and didn't notice any difference in performance, typically though we run our dev boxes with all debugging turned on. I believe the version of wirebox we are running is 4.3 but for some reason I also have a zip file labeled Wirebox 5.0 but can't seem to figure out where I got that from. I haven't been able to locate a Wirebox repo or a Coldbox 5.0 branch inside of the Coldbox repo. Would I make changes to Wirebox inside of the Coldbox development branch repo?
WireBox, CacheBox, and LogBox all live inside of the ColdBox repo. Our build separates out the standalone versions. The 5.0 version of ColdBox is what's on the "development" branch. I'm not sure if has bleeding edge builds of WireBox 5.0 yet.
ok cool. I will fork the repo when I get a chance and start scoping things, I will probably just start with Wirebox for now though. I should be able to create a test case that illustrates the performance gains as well and hopefully that is enough to warrant a merge.
OK, it will be up to if he wants the merge anything, but you can at least do some testing and see if it's any different. Hopefully Luis can chime in here.
I have bee nslowly migrating all code to script and doing the variables scoping as well as I am removing the instance scope as I do my refactoring. Help is definitely appreciated.