mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-16 01:57:16 +00:00
facc0b84e1
Tutor was making many calls to iter_installed (~100 on my machine with a dozen installed plugins). Turns out it's useless to cache Plugin and Renderer instances, as the config keeps changing all the time. Instead, we cache the list of installed plugins, which does not change in the course of a single run. On my machine this speeds up `tutor config save` by 5x, going from 7.5s to 1.3s.
22 lines
384 B
Python
Executable File
22 lines
384 B
Python
Executable File
#!/usr/bin/env python3
|
|
from tutor.plugins import OfficialPlugin
|
|
|
|
# Manually install plugins (this is for creating the bundle)
|
|
for plugin_name in [
|
|
"discovery",
|
|
"ecommerce",
|
|
# "figures",
|
|
"lts",
|
|
"minio",
|
|
"notes",
|
|
"xqueue",
|
|
]:
|
|
try:
|
|
OfficialPlugin.load(plugin_name)
|
|
except ImportError:
|
|
pass
|
|
|
|
from tutor.commands.cli import main
|
|
|
|
main()
|