Skip to content
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

To improve performance, hide tile contents or even tiles themselves when they're far enough away from the visible area. #240

Open
DrewNaylor opened this issue Jul 16, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@DrewNaylor
Copy link
Owner

I got this idea from a video on 2D Minecraft in the part where it described how chunks work and that they clip the view. It reminded me of how my phones would tend to have tiles pop-in when I scroll really fast on one of my phones because I had a lot of tiles, and how adding a lot of tiles makes scrolling a little slow on the PineTab 2.

@DrewNaylor DrewNaylor added the enhancement New feature or request label Jul 16, 2023
@DrewNaylor
Copy link
Owner Author

DrewNaylor commented Jul 17, 2023

I should also only check for tile data updates from the cache and start flip timers once the tile is close enough to be in view plus a little to the top and bottom like the main comment. Only thing is I should probably pause tile flip timers if they haven't been close enough to be visible for probably 30 seconds (this is to ensure tiles will be flipping around as you scroll; we'll also stop tiles from flipping 30 seconds after the last interaction on the UI [I think the Action Center was included in this for WP, but it might be a bit much to deal with so I might not take it into account]). The tile data also gets unloaded once tiles are too far away from view, so that's fine, it'll just not grab new data from the cache until it's back in view.

These ideas in this comment might not be ideal, but we'll need something. Maybe I won't even implement it like this, maybe the timers could keep running but only have tiles actually flip when they're close enough to be visible or just out of view? That sounds good, then things are still synchronized unless that's too much. All things considered, we'll have to roll the dice for tiles at some point. Oh, I think a way to do that is to give each tile a random time to start flipping from when it's in view and have that stored in the Tile.qml file as a property. That way we can just have their times use that if the canFlipOnTimer boolean is active (timers are stopped by default and only started with something I don't know; sometimes an app won't want tiles to flip, possibly if it's for like recent favorite pictures in a photo gallery app; tile folders will inherit from tiles and will use the timer to determine when to shift internal tiles around, but tiles inside the folder will flip if they're large enough). I already wrote down the random time to start flipping idea, just didn't have the idea to put it in the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant