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

Load Jabber module lazily #91

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

davidben
Copy link
Member

We have a ton of modules, and they currently cost us quite a bit in both startup and memory. (Go stick a return in BarnOwl::ModuleLoader::load_all and see what happens. It's pretty shocking.) It would be probably good to load the modules on-demand in some way. Exactly how, I don't know. Here's an idea for just doing it within each module. We could also do it at the module-loading layer instead. Breaking everyone's .owl/startup if we require you to explicitly load-module Jabber before jabberlogin even exists may or may not be okay, I dunno. There's also just additional UI complexity if you require users to explicitly load the module. If we load them on demand, we're going to have to change all the modules anyway to export their commands another way or something. On the other hand, doing it at the module-loading layer is probably less logic we have to duplicate.

My completely unscientific testing suggests the next biggest offenders are the Facebook and Twitter modules. I believe they both have some autologin feature, which might also be affected by something like this? IRC is also noticeable, but not as huge.

In preparation of lazily loading the Jabber module.
Impl is still loaded at startup, but we're almost there.
Brings our startup RSS down from about 45MB to 32MB. Fixes #213.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants