Skip to content

improved file manager speed (for t-embed usually)#2205

Open
mokapi47 wants to merge 1 commit intoBruceDevices:devfrom
mokapi47:dev_FilesManager
Open

improved file manager speed (for t-embed usually)#2205
mokapi47 wants to merge 1 commit intoBruceDevices:devfrom
mokapi47:dev_FilesManager

Conversation

@mokapi47
Copy link

On devices with a scroll wheel, like the t-embed, the file manager was quite slow for scrolling and hadn't been optimized for devices that can send a lot of requests in quick succession. So I improved it:

  • It redraws all lines with each scroll, so each redraw takes too long, and events accumulate. The solution: partial redraw (only 3 lines) for normal scrolling + full redraw only if the page changes. Fast redraw = we can process each event immediately without lag or teleportation.

  • Maximum 3 steps per event, but stops early if the scroll wheel stops spinning — so 1 slow click = 1 step, fast spin = up to 3 steps per frame.

If you really overuse the scroll wheel, of course it's going to start lagging... it's an ESP32, don't ask too much !

Comment on lines -756 to +753
RfCodes data{};

if (readSubFile(&fs, filepath, data))
txSubFile(data);
txSubFile(&fs, filepath);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function has changed, and your PR is moving back to the old code.

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.

2 participants