Huge strategy slows WL startup
Author: haytac
Creation Date: 2/3/2014 11:25 AM
profile picture

haytac

#1
Hi,
My strategy takes up 9.2MB of disk space and consists of 130K lines.
It takes about 4 minutes for WL Pro to come up from the time the icon is clicked.
Is there a way to speed this up?
- Windows 7, 8GB of RAM, Quad 1.73GHz processor
- Performance meter shows: commit 9.5GB, working set 7.0GB
- Could it be that it is loading many versions (each day I update multiple times) into memory
- I need one "day" version and one "minute" version to load
Thanks!
profile picture

Eugene

#2
I haven't tested it but from a logical standpoint, packing the Strategy code into a compiled assembly might speed up its startup time. I believe the slowdown comes from XML parser having to chew this monstrous XML file line by line while this is not an issue with compiled libraries.

Working example of a Strategy library:

Home - Strategies.ActiveTrader
profile picture

haytac

#3
Thanks!
I disabled the "Home" window at start-up but WL is still slow to come up. The idea was that these strategies were being XML parsed.
- Which strategies does WL choose to XML parse at startup?
- Is it possible to disable this action until startup is completed?
- How can I create a compiled assembly?
Regards,
profile picture

Eugene

#4
Nice try with disabling the Home Page tool although it hasn't had a chance to work out. Wealth-Lab loads strategy code during startup to protect itself from broken files and prebuild the "Open Strategy" dialog. You can not disable it or otherwise affect this behavior.

Still, the hypothesis is to turn your XML behemoth into binary code to avoid processing by the parser. Creating compiled assemblies in Visual Studio is explained in this KB article, steps 1-10:

Programming | How can I debug my trading strategies in Wealth-Lab?
profile picture

haytac

#5
Thanks a bunch! Glad you are there. It seems that anything in the strategies folder gets parsed. I had 3GB worth of revisions.
I moved them to an archive. Now WL launches in less than 10 seconds. In addition I had an issue logging in to Fidelity. Apparently this was related to the same issue so it also went away. Thanks again!!
profile picture

Eugene

#6
3GB worth of code - wow! You never know how creative users get in pushing the boundaries.

If the code wasn't that huge (9 Megs) to considerably slow the Snapshots tool down, I'd definitely recommend it to keep your revisions and equity/performance snapshots. Being stored as files in proprietary format, they aren't parsed at startup by WLP.