devnoname120 / vhbb

Browse, download, and launch Vita homebrews!
https://vhbb.download/
Other
415 stars 39 forks source link

Dynamic list item loading #79

Closed robsdedude closed 4 years ago

robsdedude commented 4 years ago

This fixes #75 but it makes the search more fragile.
Feel free to play around with PRE_RENDER_EXTRA_LIST_ITEM and MAX_LOAD_LIST_ITEMS_PER_CYCLE in src/Views/ListView/listView.h. They will modify the smoothness of scrolling and the memory footprint.

Now about the search. Things I found out:

Thus, I assume it is a memory leak or so, but I couldn't find a way to fix it. Sorry, I'm still not a c/c++ developer :man_shrugging:. Maybe you could have a look and find what's wrong.

PS: I marked it as WIP because of the search issue. Feel free to merge it anyway, if you want a hotfix. I won't continue the bug hunt until I have new input on this.

robsdedude commented 4 years ago

You might notice that, in contrast to what I wrote in my comment, you can see the list items load now. This is a recent change I made that makes the scrolling smoother. If you prefer the previous behavior (i.e. lagging scrolling but no missing list items) try setting MAX_LOAD_LIST_ITEMS_PER_CYCLE to something like 7 I guess.

robsdedude commented 4 years ago

Have you tried it out with increased heap size already?

devnoname120 commented 4 years ago

Sorry for the late reply I thought that I had replied already. Yes I tried it and it didn't solve the issue. I've also tried to increase stack size without luck.

I have no idea why your fix works, but it's great that it does!