plugin loading from entrypoints can be very slow in some cases

Bug #1832868 reported by Julian Andres Klode
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Breezy
Fix Released
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

Revision history for this message
Julian Andres Klode (juliank) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :

Same performance difference for log and diff, fwiw.

Revision history for this message
Julian Andres Klode (juliank) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :

also attached --lsprof-file output files

Revision history for this message
Julian Andres Klode (juliank) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :
Revision history for this message
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.

Revision history for this message
Colin Watson (cjwatson) wrote :

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

Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Jelmer Vernooij (jelmer)
Jelmer Vernooij (jelmer)
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)
Changed in brz:
milestone: none → 3.0.2
status: Triaged → Fix Committed
Jelmer Vernooij (jelmer)
Changed in brz:
status: Fix Committed → Fix Released
affects: brz → ubuntu
Changed in ubuntu:
assignee: Jelmer Vernooij (jelmer) → rashaad lane (zillablack)
milestone: 3.0.2 → none
Jelmer Vernooij (jelmer)
affects: ubuntu → brz
Changed in brz:
assignee: rashaad lane (zillablack) → Jelmer Vernooij (jelmer)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.