[BUG][PLAYER] Progress tracking massively slows down NL load time

Started by WillLem, April 19, 2021, 02:34:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WillLem

With each update of NeoLemmix, it's necessary to copy across the user data in order to preserve the progress tracking. I've found that this doesn't always work, and it's usually necessary to "recreate" the progress by performing a mass replay check on the packs you've played/are playing (doing so usually restores green ticks and talismans).

However, it isn't always desirable to do this workaround anyway, since it seems that the more tracking data that exists, the longer it takes for NL to load up. Note: the initial amount of "unplayed" level packs in the NL directory does not affect this; the slowdown specifically happens when the F2 menu becomes more and more populated with user progress tracking.

namida

Known issue. Low-ish priority - but it is something I want to look at before declaring a final version, for sure.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

See if this build loads better for you. Please also see if you can find any issues in the level select menu while using it, in particular around talismans. Use it with an existing 12.12 installation.

It is expected that you might get a bit of lag the first time you select each pack in the level select menu. This is basically done as a tradeoff - the data-loading that caused this slowdown is only loaded when you actually try to select a level/pack that it's relevant to, rather than all such data being loaded on startup.

Please note that you won't actually be able to go in-game using this build.

EDIT: Attachment removed. See newer experimental build in reply #6.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

Quote from: namida on October 31, 2021, 07:24:50 PM
Please also see if you can find any issues ... in particular around talismans
...
It is expected that you might get a bit of lag the first time you select each pack in the level select menu. This is basically done as a tradeoff

Yes, this build seems to work exactly as expected. Placing an old userdata file into "settings" results in the relevant green ticks being shown in this menu and without causing any slowdown during loading; the packs do lag the first time they are selected, but are fine thereafter (note - this happens each time you run NeoLemmix, the packs already loaded aren't "remembered" on subsequent loads).

Didn't notice anything unusual regarding the Talismans, was there anything in particular you expected?

Minor note - a text file called "NeoLemmix logging" is created on loading this build, which seems to be new behaviour for NL. Is this part of the fix?

namida

QuoteDidn't notice anything unusual regarding the Talismans, was there anything in particular you expected?

Nothing specific, just in general that the talismans are part of the "not loaded until later" data so more likely to be prone to issues.

QuoteMinor note - a text file called "NeoLemmix logging" is created on loading this build, which seems to be new behaviour for NL. Is this part of the fix?

No, not related at all. Sometimes useful debugging info gets dumped into that file in experimental builds, that's all.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

kaywhyn

Just tried this version, although here I used namida's version that he PMed to me, because for some reason the attachment a few posts above simply kept resulting in a crash every time a pack was selected.

Here are my findings: NL loads much faster (about 5 seconds in contrast to maybe somewhere 20 seconds and upwards with the current NL stable version), and, unlike with WillLem, selecting a pack the first time does not result in any lag for me at all! Thus, this means every time I close and reopen NL I don't experience any lag whatsoever when selecting packs.

edit: No, I misunderstood. I do see the lag that WillLem has experienced, but it's only for about 3 seconds when selecting packs, which I think is what you meant?

edit 2: With some additional testing, it seems that shortly after a level pack has loaded the lag is significant and noticeable if you press F2 or click the level select button shortly after, where the pause is obvious. However, if you wait for about 10 seconds or so before pressing F2 or clicking the level select button, then the pause isn't as noticeable, taking only about 1-2 seconds 

Thanks for this, namida! :thumbsup:
https://www.youtube.com/channel/UCPMqwuqZ206rBWJrUC6wkrA - My YouTube channel and you can also find my playlists of Lemmings level packs that I have LPed
kaywhyn's blog: https://www.lemmingsforums.net/index.php?topic=5363.0

namida

Here's a public release of the experimental version I sent to Willlem and kaywhyn. It should be identical to 12.12.1 except for having the new progress loading behavior.

Assuming no issues are reported, I'll release a V12.12.2 update that includes this in the next week or so.

EDIT: Attachment removed; get a newer EXP build that also includes this fix here: https://www.lemmingsforums.net/index.php?topic=5822.0 (reply #1)
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

WillLem

I have used this version today to go through Apjjm's replays for DéjàLems. Everything seems to work great, including checking replays, talismans and records, working on levels in the Editor and opening them via NL, etc. So... nothing to report, generally.

The only thing I did notice is that this version overrides my DPI preferences. I had to go into (Win) Properties and set it to "Scaling performed by: System (Enhanced)" to get the usual look which I'm used to (note that I prefer NL to display slightly smaller than it is capable of, because I almost always play it windowed with various other things going on. The larger display and panel are great for Full Screen mode, though :thumbsup:)

namida

There shouldn't be any change to how DPI is handled. But - I am now compiling this using Delphi 10.4, as 10.3 randomly stopped working for me, so it's very possible that has messed up some DPI-related stuff. There was a bug in development with the level select menu in which the preview info would be displayed in the wrong position, hiding some of the level list, which I was able to confirm as being related to the 10.3 -> 10.4 change.

I'll have to do some testing with this and figure out what's going on.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)

namida

Anyway, it'd seem at this stage, the actual issue this topic is about is fixed, with no nasty side effects, so I am now closing this topic. There are other topics for further discussion of the DPI / etc issues.
My projects
2D Lemmings: NeoLemmix (engine) | Lemmings Plus Series (level packs) | Doomsday Lemmings (level pack)
3D Lemmings: Loap (engine) | L3DEdit (level / graphics editor) | L3DUtils (replay / etc utility) | Lemmings Plus 3D (level pack)
Non-Lemmings: Commander Keen: Galaxy Reimagined (a Commander Keen fangame)