Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Serialized Projects for faster Startup #3483

robodude666 opened this issue Oct 19, 2017 · 2 comments


None yet
4 participants
Copy link

commented Oct 19, 2017

As an alternative to some of my impossible requests in #3041:

Allow for an option to enable Rubberduck to serialize and cache its understanding of libraries/projects on disk. This makes reopening a large project that contains a lot of 3rd party COM references or AddIns easier.

I'm okay with waiting 10 minutes for Rubberduck to parse my 3rd party libraries once and then allow Rubberduck on future loads to only have to parse the active project but still retain knowledge about everything from what it learned the first time it parsed everything.


This comment has been minimized.

Copy link

commented Nov 3, 2017

Thing is, we already can load the COM declarations from serialized xml files when they exist, but that is actually slower than just loading the COM library and reflecting it... So it was never put in a release build. If you have a fork/clone you can experiment with a debug build.


This comment has been minimized.

Copy link

commented Nov 3, 2017

Just for reference, the libraries referenced by the projects should not be the problem here. COM reflecting those takes 2s MAX, i.e. for VBA, the Excel object model, Scripting and ADO.

The real problem are 3rd party add-ins whose code is visible in a project in the VBE. These get parsed the usual way and then even inspected. Since the user is not meant to change the code, parsing every VBE session is wasteful and inspecting these projects after every parse is just useless; it probably also produces a lot of clutter in the inspection results window.

I would like to repeat here my proposed solution from the original issue: we could introduce a new menu to manage serialized/saved projects. There, one would be able to save projects to file and mark projects to be loaded from file. Then, the marked projects would be loaded from file during the parsing process, maybe right after the COM references. To keep the projects out of the inspection process, they should all have UserDefined set to false.

Please note that, though declaration serialization has been implemented already, this will require some effort. It will require changes to the parsing process, a UI, settings to remember both the file paths of known serialized projects and the choice of whether to use them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.