-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
regmap: Delay importing shells to reduce load time
Importing the shells takes on average 220ms, which makes starting up a regmap based command line tool slower than necessary when they aren't being used. This change delays the import of the shell packages until invoked by a command line request. The loading time for importing regmap_esnet_smartnic.regio decreases from on average 310ms to 90ms. Import time was measured using: - python3 -X importtime -c 'import regmap_esnet_smartnic.regio' - python3 -X importtime -c 'import IPython' The importtime directive displays it's measurements in microseconds, with the first column being the time for a module, excluding nested imports, and the second being the cumulative time, including nested imports. https://docs.python.org/3/using/cmdline.html?highlight=importtime#cmdoption-X
- Loading branch information
1 parent
7273ece
commit 1a35d98
Showing
1 changed file
with
33 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters