-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
bugSomething is brokenSomething is broken
Description
Describe the bug
When using a ScrollArea with a very large content (thousands of lines) the gui becomes very sluggish.
To Reproduce
Steps to reproduce the behavior:
let content: String = (0..1000000).map(|s| s.to_string() + "\n").collect();
egui::ScrollArea::vertical()
.id_source("serial_output")
.auto_shrink([false; 2])
.stick_to_bottom(true)
.enable_scrolling(true)
.show(ui, |ui| {
ui.add(
egui::TextEdit::multiline(&mut content.as_str())
.font(DEFAULT_FONT_ID)
.lock_focus(true)
.text_color(egui::Color32::WHITE)
.desired_width(width),
);
});
This is based on the "text_editor" egui example, but the issue also occurs when just using ui.label()
to display the content.
Expected behavior
I would expect the GUI to only draw the visible part of the content, so that the total amount would have no impact on the performance.
Observed on Desktop:
- OS: macOS 13.3.1, Windows 10
- Browser: not tested
- Version: latest git
HouseDwarfSpace
Metadata
Metadata
Assignees
Labels
bugSomething is brokenSomething is broken