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

Opusfilter filters #47

Merged
merged 31 commits into from
Mar 2, 2023
Merged

Opusfilter filters #47

merged 31 commits into from
Mar 2, 2023

Conversation

jelmervdl
Copy link
Collaborator

@jelmervdl jelmervdl commented Nov 9, 2022

Add opusfilters as choices to the list of included filters.

  • Add definitions for filters
  • Add definitions for preprocessors
  • Add UI for added parameter types
    • list
    • tuple
  • Export to opusfilter YAML
  • Import (parts of) opusfilter YAML

@jelmervdl jelmervdl added the component:filter Related to or suggestion for a new filter block label Nov 9, 2022
@jelmervdl jelmervdl linked an issue Nov 9, 2022 that may be closed by this pull request
@jelmervdl
Copy link
Collaborator Author

One thing I noticed was that opusfilter effectively loads all its dependencies on start. For long running processes this makes sense (detect import errors early on etc.) but for this runner it is a bit annoying.

Maybe there is an easy way to hook into importlib and only load a proxy module for some modules, and only when accessing of any of its components is noticed we load the actual module.

@svirpioj
Copy link

One thing I noticed was that opusfilter effectively loads all its dependencies on start. For long running processes this makes sense (detect import errors early on etc.) but for this runner it is a bit annoying.

Is it some specific dependencies that cause trouble? I guess we could try to use dynamic import for those.

@jelmervdl
Copy link
Collaborator Author

I'm not sure which bit of it is causing it. I'm using importlib's LazyLoader at the moment, and that helps to shave it down to half but start-up time on my laptop is still 2.5 seconds.

I haven't looked at hooking up some measuring callbacks to lazyloader. I also imagine there are off-the-shelf tools out there that can help us measure and break down import times per package.

@svirpioj
Copy link

svirpioj commented Nov 23, 2022

Is it some specific dependencies that cause trouble? I guess we could try to use dynamic import for those.

Well, there was quite a few, with python -X importtime and tuna those were easy to find. Now on OpusFilter's develop branch, the slow modules are imported only when needed. Reduced the startup time on my computer something like 80%.

Edit: Now it's in release 2.6.0.

@jelmervdl jelmervdl marked this pull request as ready for review March 2, 2023 15:50
@jelmervdl jelmervdl merged commit d448ead into main Mar 2, 2023
@jelmervdl jelmervdl deleted the opusfilter-compat branch March 2, 2023 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:filter Related to or suggestion for a new filter block
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Opusfilters integration
2 participants