zencq / NomNom

NomNom is the most complete savegame editor for NMS but also shows additional information around the data you're about to change. You can also easily look up each item individually to examine its attributes, independently of a savegame, or get other useful information that are not related to a specific savegame (but enhanced if one is loaded).
https://zencq.github.io/NomNom/
GNU General Public License v3.0
467 stars 37 forks source link

[Bug] "Learn All" words button (execution) is very slow #190

Open leeterry opened 3 months ago

leeterry commented 3 months ago

Description

After finally getting it to work (see my post in the other bug report). I loaded my save and attempted to edit my languages/milestones (hoping to get rid of the spam messages). However, the editor froze when I clocked the learn all button and became unresponsive for a few seconds. After that time had passed and it started working again nothing had changed despite my pressing the button and clicking each option to learn the words manually had the same result.

cengelha commented 3 months ago

The current implementation isn't ideal. The "Learn all" just unlocks each as it would when you manually unlock it which is quiet heavy. For each word it first has to find and update the actual value and then it has to find and update the WORDS_LEARNT stats by counting all for the global number and then counting again for the race. For examaple there are over 900 words for the Gek and just takes it time to do this for all of them. Would be better to just update the value and count once afterwards (or just set it to the total no of words as we know that number).

Beside that it does what it should. I just tested it and all checkbox were set and after saving and restarting NN all words were still marked as unlocked.

I'll keep this open as remainder to improve it in the future ;)

fureimu commented 4 days ago

Hello there! "Learn all" button currently (at curse exp version) completely hangs the app. Its constantly using precisely 10% of my CPU and 771.5 MB of RAM and nothing happens. No disk activity there. The app does not respond.

Windows 10, Ryzen 1600 CPU.