# Systemic UI slowness: entire application sluggish even with no project open — …rooted in ~37 wxTimer instances and busy wxEVT_IDLE loops (static code evidence included; consolidates #3702, #9413, #9967, #1950)
---
## Bambu Studio Version
2.6.0.51
## Where is the application from?
Bambu Lab Official website
## OS version
Windows 11 Pro, version 25H2 (OS-version 26200.8246)
## Additional system information
CPU: Intel Core i7-12800HX (12th gen Alder Lake-HX, 16 cores / 24 threads)
Memory: 64 GB
Display Card (dGPU): NVIDIA RTX A2000 Laptop GPU, 8 GB VRAM — driver 32.0.15.9166
(Ampere-generation workstation card; two architectural generations behind current Ada Lovelace / Blackwell)
Display Card (iGPU): Intel UHD Graphics (driver 32.0.101.7084)
System is a mobile workstation — well in excess of Bambu Studio's stated requirements.
The same UI slowness has been independently reproduced on a second, physically separate PC equipped with a newer-generation NVIDIA dGPU. The problem is therefore not hardware-specific to one machine or one NVIDIA generation.
## Printer
Bambu Lab H2D and Bambu Lab X1C
## Printer Firmware Version
N/A — issue reproduces before and without any printer connection.
## How to reproduce
1. Launch Bambu Studio from the Start menu (no project file opened).
2. Wait for the splash / initial load to complete and the main window to appear.
3. Click any of the main tabs (Prepare, Preview, Project, Calibration, Device, Cloud, ...).
4. Observe that UI responsiveness is severely degraded globally — mouse clicks register with multi-second delay, tab switches take several seconds, scrolling and hover feedback are sluggish.
5. Leave the application idle on the Prepare tab with no project loaded and no printer connected. Observe that CPU and page-fault activity for `bambu-studio.exe` remain elevated indefinitely.
6. (Optional diagnostic) In Task Manager → Details tab → right-click column headers → add "Page Faults" and "Page Fault Delta" columns. You will typically see `bambu-studio.exe` generating thousands of page faults per second while idle (same signature as #3702).
## Actual results
The entire Bambu Studio UI is severely sluggish. This is not limited to a specific tab — every interaction (tab switching, button clicks, dropdowns, window dragging) is delayed by multiple seconds. The problem:
- Reproduces with no project open, no printer connected, no slicing in progress.
- Reproduces on two physically separate PCs (different NVIDIA generations, different CPUs).
- Persists across application restarts and user-profile recreation.
- Matches the symptom reports in multiple currently-open issues:
- #3702 — "Page faults even when idle" (open since March 2024, 69 comments)
- #9413 — "Atrocious performance on NVIDIA GPUs" (open since January 2026)
- #9967 — "Idle CPU spiking to ~100% every minute for 15–20 seconds" (open since March 2026)
- #3806 — "Very High CPU use while idle - Mac OS" (performance-labelled)
- #1950 — "1000 ms timer in Monitor.cpp causes stutter" (open since 2023)
- #8891 — "Becomes unresponsive after several hours; File/Edit menus still work but tabs do not"
- #5403 — "Mouse clicks ignored / require repeated clicks"
---
## Root-cause investigation (static code analysis of master @ `bf68eece`)
Read-only static analysis of `src/slic3r/GUI/` on current master. Every `file:line` reference below is literal and can be opened on GitHub for verification. This is a structural report, not a reproduction of a single bug: the sluggishness appears to be the compound effect of four independent UI-thread anti-patterns.
### 1. Timer explosion — 37+ `wxTimer` instances, 110 total `wxTimer` references in `src/slic3r/GUI/`
The following timers are started during normal application lifetime. Several run continuously while their containing panel is visible; some run irrespective of visibility (exceptions noted in the notes column).
| File | Interval | Note |
|------|---------:|------|
| `BaseTransparentDPIFrame.cpp:24` | **20 ms** | `#define ANIMATION_REFRESH_INTERVAL 20` — 50 FPS |
| `ImageDPIFrame.cpp:19` | **20 ms** | same |
| `AMSDryControl.cpp:759` | **70 ms** | `m_progress_timer->Start(70)` |
| `GLCanvas3D.cpp:10290` | **100 ms CONTINUOUS** | `m_timer.Start(100, wxTIMER_CONTINUOUS)` — started for layer-editing; alive for the lifetime of the canvas |
| `FilamentPickerDialog.cpp:56,803` | **50 ms** | flash + click timers |
| `CaliHistoryDialog.cpp:203` | **200 ms** | |
| `CalibrationPanel.cpp:17,244` | **200 ms** | `LIST_REFRESH_INTERVAL` |
| `FilamentMapPanel.cpp:447` | **500 ms** | |
| `Plater.cpp:830` | **500 ms** | `timer_sync_printer->Start(500)` |
| `Plater.cpp:7009, 9703` | 500 ms one-shot | `background_process_timer` |
| `Plater.cpp:12778` | **500 ms** | |
| `Monitor.cpp:37,162` | **1000 ms** | `#define REFRESH_INTERVAL 1000` — the same value flagged in #1950 three years ago |
| `CalibrationPanel.cpp:14,507,654` | **1000 ms** | `REFRESH_INTERVAL` |
| `BonjourDialog.cpp:143` | 1000 ms | |
| `MultiMachineManagerPage.cpp:680` | 1000 ms | |
| `MultiTaskManagerPage.cpp:1405` | 1000 ms | |
| `MultiMachinePage.cpp:63` | **2000 ms** | |
| `SendMultiMachinePage.cpp:812` | **4000 ms** | |
| `GUI_App.cpp:2648` | 5000 ms one-shot | |
| Header-declared timer members (started elsewhere): `AMSItem.hpp:307`, `AnimaController.hpp:30`, `CameraPopup.hpp:64`, `DeviceErrorDialog.hpp:105`, `MarkdownTip.hpp:59`, `PrintOptionsDialog.hpp:182`, `SelectMachine.hpp:311,419`, `SelectMachinePop.hpp:193`, `SendMultiMachinePage.hpp:86`, `SendToPrinter.hpp:129`, `SyncAmsInfoDialog.hpp:95`, `ThermalPreconditioningDialog.hpp:30`, `WebUserLoginDialog.hpp:68`, `WebViewDialog.hpp:97`, `MultiNozzleSync.hpp:178`, `SideTools.hpp:67`, `FilamentGroupPopup.hpp:70`, `FilamentPickerDialog.hpp:107,111`, `MainFrame.hpp:97`, `ReleaseNote.hpp:330`. | | |
`GLCanvas3D.hpp` alone declares **five** timer-related members: `m_timer` (line 613), `m_timer_set_color` (614), `RenderTimer m_render_timer` (649), and two nested-class timer instances for Toolbar/Gizmo highlighters (797, 813). With two canvases live at once (view3D + preview) that is ~10 timer objects in the 3D subsystem alone.
### 2. `Monitor::update_all()` is a 1000 ms synchronous poll on the UI thread
`src/slic3r/GUI/Monitor.cpp:158-164`:
```cpp
void MonitorPanel::init_timer()
{
m_refresh_timer = new wxTimer();
m_refresh_timer->SetOwner(this);
m_refresh_timer->Start(REFRESH_INTERVAL); // 1000 ms
if (update_flag) { update_all();}
}
```
`update_all()` (line 345+) fetches `NetworkAgent*`, `DeviceManager*`, `selected_machine`, calls `is_connecting()`, `is_connected()`, `is_server_connected()`, iterates an HMS `std::map`, and updates four sub-panels — all on the UI thread. This matches exactly what #1950 reported in 2023.
`MonitorPanel::Show(true)` (line 459-462) additionally calls `m_refresh_timer->Stop(); m_refresh_timer->Start(); update_all();` — so **every switch to the Monitor tab synchronously performs a full refresh before returning**.
Lifecycle symmetry is inconsistent elsewhere: `MonitorPanel::Show(false)` does stop its timer, but some sibling panels have their `Stop()` calls **commented out in source** (e.g. inside `MultiMachinePickPage::Show()` at `MultiMachinePage.cpp:485,491`, where the matching `Start(4000)` at `:487` is also commented out — so the class is a latent-timer stub rather than an active offender, but the pattern is live in the tree).
### 3. `wxEVT_IDLE` handler in `GLCanvas3D` re-fires itself while flags are set
`src/slic3r/GUI/GLCanvas3D.cpp:3935-3984` performs the following work on every idle event:
- `p_main_toolbar->update_items_state()`
- `sidebar().get_update_3d_state()` (and `cancel_update_3d_state()` if set)
- `collapse_toolbar.update_items_state()`
- `mouse3d_controller.apply(...)`
- `notification_manager->update_notifications(*this)`
- `gizmo->update_items_state()`
and then, conditionally:
```cpp
if (m_extra_frame_requested || mouse3d_controller_applied) {
m_dirty = true;
m_extra_frame_requested = false;
evt.RequestMore(); // idle event re-fires immediately
}
```
`RequestMore()` is gated — it is not unconditional — but every code path that sets `m_extra_frame_requested = true` (and there are several in the render / interaction code) becomes a trigger for a tight idle-event loop that lasts until the flag stops being re-asserted. In practice, with an active 3D-mouse controller or ongoing render dirty-state, the idle thread is repeatedly rescheduled rather than blocking.
Other idle handlers with real work:
- `src/slic3r/GUI/GUI_App.cpp:3291-3324` — calls `is_studio_active()` (Win32 API), MQTT subscribe/unsubscribe, and **performs a synchronous disk write** `app_config->save()` when dirty. At the idle-event rate on Windows this can mean tens of config-file flushes per second while the config stays dirty.
- `src/slic3r/GUI/MainFrame.cpp:735-744` — polls `can_save()`, `can_undo()`, `can_redo()` and updates three toolbar buttons on every idle.
- `src/slic3r/GUI/Plater.cpp:6970-6974` — recalculates sidebar size.
Two idle bindings are **empty** but still registered: `src/slic3r/GUI/Widgets/DropDown.cpp:72` and `src/slic3r/GUI/Widgets/FanControl.cpp:677` (`[](wxIdleEvent& evt) {}`). They serve only to keep idle events flowing for every instantiated widget.
### 4. God-object source files
| File | Lines | `#include` count |
|------|------:|------:|
| `src/slic3r/GUI/Plater.cpp` | **23 675** | **163** |
| `src/slic3r/GUI/GLCanvas3D.cpp` | 13 560 | 69 |
| `src/slic3r/GUI/Tab.cpp` | 8 448 | — |
| `src/BambuStudio.cpp` | 8 293 | — |
| `src/slic3r/GUI/GUI_App.cpp` | 8 200 | 106 |
| `src/slic3r/GUI/DeviceManager.cpp`| 4 901 | — |
| `src/slic3r/GUI/MainFrame.cpp` | 4 506 | 63 |
Translation units of this size essentially guarantee poor instruction-cache locality during startup and tab-switch operations, and make the compile-edit-verify cycle slow enough that iterative performance work in these files is uneconomic. This is a plausible contributor to the memory-pressure / page-fault symptoms tracked in #3702, though the mechanical link requires a profiler to confirm.
### 5. Synchronous `.perform()` HTTP calls reachable from UI code
`grep ".perform()" src/slic3r/GUI/*.cpp` shows 11 call sites, including:
- `GUI_App.cpp:5240` (check new version)
- `GUI_App.cpp:5324`
- `GUI_App.cpp:5578` (check privacy)
- `GUI_App.cpp:5603`
- `BindDialog.cpp:955, 1179`
- `WebViewDialog.cpp:884, 918, 1010, 1022`
- `StatusPanel.cpp:5490`
Whether any of these actually block the UI thread depends on whether `Http::Builder::perform()` is synchronous from the caller's point of view, which I have not traced all the way through. Please audit.
---
## Why this matters
Combined:
- 37+ timers at 20–5000 ms intervals feeding `wxEVT_TIMER` events continuously while their panels are alive,
- plus `wxEVT_IDLE` handlers that do real work on every fire and can re-fire themselves while flags are set,
- plus synchronous disk I/O (`app_config->save()`) on the idle path when the config is dirty,
- plus per-second synchronous device polling on the Monitor tab (and the same pattern replicated in Calibration / MultiMachine panels),
- plus translation units of 8 000–23 000 lines with triple-digit `#include` counts,
= a UI thread that is rarely genuinely idle. This is a mechanically plausible cause of the thousand-page-faults-per-second symptom in #3702 (every wake-up touches a large working set) and of the general UI lag regardless of tab. A profiler run against an idle process would confirm which of these paths dominate — but the structural preconditions for the symptom are all present in the source.
## Expected results
Bambu Studio UI should be responsive (< 100 ms per interaction) when idle with no project open, comparable to PrusaSlicer 2.x and OrcaSlicer on the same hardware.
Specifically:
- Tab switching should complete in well under one second.
- CPU usage should fall to near-zero when the application is genuinely idle.
- Page-fault delta for `bambu-studio.exe` should not exceed a few hundred per second at idle.
- No timer or idle handler should perform synchronous disk I/O or HTTP on the UI thread.
## Suggested remediation (for Bambu Lab engineers)
**Low risk / quick wins (days):**
1. Ensure every panel's `m_refresh_timer` is stopped in its `Show(false)` path. `Monitor::Show(false)` does this correctly; several other panels do not, and the `MultiMachinePickPage::Show()` method at `MultiMachinePage.cpp:485-491` has both `Stop()` and the matching `Start(4000)` commented out — the lifecycle path needs to be restored or the dead code removed.
2. Remove the empty `wxEVT_IDLE` bindings in `Widgets/DropDown.cpp:72` and `Widgets/FanControl.cpp:677`. They serve no purpose.
3. Debounce `app_config->save()` in the idle handler at `GUI_App.cpp:3318` — currently saves on every idle when dirty. A 5-second debounce with a final flush in `OnExit()` is a safe fix.
4. In `GLCanvas3D::on_idle` (`GLCanvas3D.cpp:3935-3984`), audit every code path that sets `m_extra_frame_requested = true` and confirm it becomes `false` promptly — today the idle loop re-fires while either `m_extra_frame_requested` or `mouse3d_controller_applied` holds.
5. Make `GLCanvas3D::m_timer` event-triggered instead of 100 ms continuous — it is only used for layer editing (see `on_timer` at line 4812). Start it when layer-editing mode is entered, stop it when exited.
**Medium (weeks):**
6. Replace the 37+ independent `wxTimer` instances with a single application-wide refresh scheduler that dispatches per-subscriber at each subscriber's own interval. The proliferation of 500 ms / 1000 ms / 2000 ms timers is the root cause of the timer-storm, not any individual timer.
7. Move `Monitor::update_all()` device polling to a background thread; post results back to the UI via `wxCallAfter`. Today the UI thread is blocked for the full device-poll duration every second the Monitor tab is visible.
8. Audit all `.perform()` call sites and make synchronous HTTP impossible from the UI thread at compile time (e.g. `[[nodiscard]]` on the synchronous API plus an explicit `.perform_async()` for UI-reachable code).
**Long-term (months):**
9. Break up `Plater.cpp` (23 675 lines, 163 `#include`) and `GLCanvas3D.cpp` (13 560 lines) into cohesive sub-modules. In their current form, iterative performance work on these files is effectively impossible — the compile-verify cycle is too slow and the coupling surface too large for any change to be isolable.
10. Run Windows Performance Analyzer against an idle Bambu Studio process and publish the top stacks. This is the cheapest way to confirm which of the structural anti-patterns above dominates the #3702 page-fault storm.
11. Add opt-in telemetry that logs idle-event rate and per-timer work time, so UI-responsiveness regressions can be caught in CI rather than by users.
## Project file & Debug log uploads
Project file: N/A — the issue reproduces without any project loaded.
Log file: will attach separately.
## Checklist of files to include
- [ ] Log file
- [ ] Project file (N/A — reproduces without project)