plugin loading from entrypoints can be very slow in some cases

Bug #1832868 reported by Julian Andres Klode on 2019-06-14
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Breezy
Critical
Jelmer Vernooij

Bug Description

bzr info is 0.07s user, brz info is 0.25s user for me in various repositories.

I ran --lsprof info to get the attached file and elapsed time vs 0.142 vs 0.336 seconds.

Related branches

Julian Andres Klode (juliank) wrote :
Julian Andres Klode (juliank) wrote :
Julian Andres Klode (juliank) wrote :
Julian Andres Klode (juliank) wrote :

Same performance difference for log and diff, fwiw.

Julian Andres Klode (juliank) wrote :
Julian Andres Klode (juliank) wrote :
Julian Andres Klode (juliank) wrote :

also attached --lsprof-file output files

Julian Andres Klode (juliank) wrote :
Julian Andres Klode (juliank) wrote :
Colin Watson (cjwatson) wrote :

This is due to loading plugins from entry points; pkg_resources.iter_entry_points is slow. As a workaround, BRZ_PLUGIN_PATH=-entrypoints skips this and restores most of the performance difference.

Colin Watson (cjwatson) wrote :

It might be worth considering https://pypi.org/project/importlib-metadata/.

Jelmer Vernooij (jelmer) on 2019-06-14
Changed in brz:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer) on 2019-06-15
summary: - 2-3 times slower than bzr for simple things
+ startup 2-3 times slower than bzr in some cases
summary: - startup 2-3 times slower than bzr in some cases
+ plugin loading from entrypoints can be very slow in some cases
tags: added: performance plugins
Jelmer Vernooij (jelmer) on 2019-10-13
Changed in brz:
milestone: none → 3.0.2
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer) on 2019-10-16
Changed in brz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers