Skip to content

Refactor main.py to dynamically import pipeline classes only when needed#3

Open
HyperNaser wants to merge 1 commit into
mainfrom
performance/imports
Open

Refactor main.py to dynamically import pipeline classes only when needed#3
HyperNaser wants to merge 1 commit into
mainfrom
performance/imports

Conversation

@HyperNaser

Copy link
Copy Markdown
Owner

Performance Comparison (Startup Latency)

By breaking the eager import cascade in src/pipelines/__init__.py and deferring heavy library loading to runtime conditional blocks, we have eliminated significant initialization overhead.

Visual Profiling (Flame Graphs)

Before

profile

Notice the massive horizontal layout dominated by importlib and core library initialization on entry.

After

new_profile

The import tree is entirely stripped down, loading dependencies lazily.

…and-line arguments; remove __init__.py exports for pipelines.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant