-
Notifications
You must be signed in to change notification settings - Fork 7
Priority based action script loading #112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit 8c7a7ee.
WalkthroughIntroduces two-phase loading of action scripts in core/main.gd with a new _main_scripts_loaded callback and emits a check_options signal between phases. Updates performance testing to use multiple flags and parameterized behavior. Adjusts CodeEdit UI properties in the scene. Adds documentation updates and expands performance metrics and flow in tests/performance.gd. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Main as Main (core/main.gd)
participant Loader as ScriptLoader
participant Signals
participant Editor
User->>Main: Start app
Main->>Loader: load(main-script paths)
Loader-->>Main: main scripts loaded
Main->>Main: _main_scripts_loaded()
Main->>Signals: emit check_options
Main->>Loader: load(low-priority scripts)
Loader-->>Main: all scripts loaded
Main->>Main: _all_scripts_loaded()
alt last file auto-opened
Main->>Editor: grab_focus()
end
sequenceDiagram
autonumber
participant Tests as Autoload Tests
participant Perf as tests/performance.gd
participant Panels as PanelManager
participant Signals
Tests->>Perf: new(startup, open_file)
alt startup == true
Perf->>Perf: record start_time on first frame
Perf->>Panels: await load_completed
Panels-->>Perf: completed
Perf->>Signals: await check_options
Signals-->>Perf: received
Perf->>Perf: print main scripts time, total startup, all scripts time, total setup
end
alt open_file == true
Tests-->>Perf: open_started signal
Perf->>Perf: measure open-file time
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (5)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Type of Change
Description
Action Scripts are divided into two main categories (file menu) and secondary (the rest). The user interface will be fully usable after loading the main items, so there is no need to wait until the end of the loading process. This roughly halves the actual startup time (-60.4%), although the overall startup is slightly slower.
Testing
Works perfectly.
Impact
Environment
Before
After
Overall Comparison
Additional Information
This update includes test improvements, improvements in the behavior of automatically loading the last file, a separate loader for main Action Scripts, setting the default values of the View menu as the editor default, and removing the search_delay parameter from the performance test.
Checklist
Summary by CodeRabbit
New Features
Documentation
Tests