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

Evaluate Capsul v3 overhead when running many Morphologist pipelines #278

Open
sapetnioc opened this issue Apr 20, 2023 · 5 comments
Open
Labels

Comments

@sapetnioc
Copy link
Collaborator

No description provided.

@sapetnioc sapetnioc added the 3.0 label Apr 20, 2023
@denisri
Copy link
Collaborator

denisri commented Jul 27, 2023

nb iterations v2 v3 time factor
50 6.6s 11.8s x 1.8
500 75s 135s x 1.8

so capsul v3 is about twice slower than v2 with FOM completion.
It can probably be improved since ProcessMetadata.metadata_modifications() parses parameters on the whole pipeline, is called for each instance of the iteration, and could probably be cached. But not in all cases since the pipeline state may be modified from one iteration to another (if iterating over switches states for instance), so such a cache should depend on the pipeline nodes activation state, at least.

@denisri
Copy link
Collaborator

denisri commented Jul 27, 2023

If re-using the same meta_modifications across iterations, the time for 500 iterations completion for Morphologist drops to 32s, which now is 4 times faster, and 2.3 times faster than capsul v2 with FOM.
Now we need to be able to determine (in a fast way) if the pipeline state has changed between iterations. We could store all nodes states with the cache when doing metadata_modifications() perhaps.

denisri added a commit that referenced this issue Jul 27, 2023
Speeds completion up more than 4 times for large iterations. (#278)
@denisri
Copy link
Collaborator

denisri commented Jul 27, 2023

The cache has been implemented. The cache hash key takes into account plugs states, and inner nodes states for pipelines. I think it is enough (but if I have forgotten anything, we could fix it).
Completion is now officially faster than v2/FOMs by a factor 2.3. Completion took 32.3s for 500 iterations.

@denisri denisri closed this as completed Jul 27, 2023
@denisri denisri reopened this Dec 6, 2023
@denisri
Copy link
Collaborator

denisri commented Dec 6, 2023

There has been changes in schemas and completion, so we have to re-assess the performance of path completions.

@denisri
Copy link
Collaborator

denisri commented Dec 6, 2023

After the merge of the branch rethink_schemas, the time to perform completion for 500 iterations of Morphologist is now 111s. This means that we have gone back to the situation before the cache optimization. I guess the cache has been removed ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants