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

Lilv is insanely slow for some reason #56

Open
jcelerier opened this issue Mar 1, 2023 · 1 comment
Open

Lilv is insanely slow for some reason #56

jcelerier opened this issue Mar 1, 2023 · 1 comment

Comments

@jcelerier
Copy link

I don't have that many plug-ins, but Lilv is making all my LV2-using apps having a very slow startup, like 8 seconds when I try to profile. Lilv 0.24.20 as shipped by Arch Linux

Here's a profiler trace:
lv2

I have 78 megabytes of .ttl files in my /usr/lib which isn't that much for my computer (i7-8750H with 32GB of ram), my hunch is that there's some quadratic behaviour occuring somewhere.

@drobilla
Copy link
Collaborator

drobilla commented Mar 4, 2023

For hosts that load everything at startup (which is unfortunately pretty common due to getting the name, which is the case here) it will take a bit of time, but 8 seconds on a machine like that is certainly a lot more than I'd expect. I have considerably more data overall installed and even debug builds take nowhere near that long.

I should consider building in profiling to make it easier to see where the time goes, because the data structure of plugins themselves can affect this dramatically (e.g. including all presets in the main data file), but there's nothing like that at the moment.

my hunch is that there's some quadratic behaviour occurring somewhere

Doubtful, unless the host is really going out of its way to make that happen. This is probably several hundred thousand, if not millions, of statements. If anything was quadratic it would be a lot slower than 8 seconds. What's happening here is loading all of the statements into B-trees, which is roughly O(nlgn).

Anyway, please attach:

  • Which host(s) you're using
  • Which plugins you have installed (output of lv2ls will do, package list would be handy if you can get it)
  • The above profile with a time legend if possible, and details about what exactly it is measuring
  • What kind of drive this is on, and anything non-stock about the system

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

No branches or pull requests

2 participants