populse / capsul

Collaborative Analysis Platform : Simple, Unifying, Lean
Other
7 stars 14 forks source link

Evaluate Capsul v3 overhead when running many Morphologist pipelines #278

Open sapetnioc opened 1 year ago

denisri commented 1 year ago
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 commented 1 year ago

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 commented 1 year ago

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 commented 8 months ago

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

denisri commented 8 months ago

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 ?