trevorsandy / lpub3d

An LDraw™ editor for LEGO® style digital building instructions.
https://trevorsandy.github.io/lpub3d/
133 stars 19 forks source link

LPub3d hanging loading extremely slowly #464

Closed AdvancedStyle closed 3 years ago

AdvancedStyle commented 3 years ago

Environment

Configuration

Out of the box appimage

Subject

I'm loading a large model (90 steps with about 2200 pieces) and LPub3d is constantly freezing. I have 36cores and 64GB RAM so resources is not an issue.

When it starts grinding I see a message like this in logs:

DEBUG 2020-10-19T18:51:25.579 "Draw page graphics - Elapsed time: 0.002 second" 
TRACE 2020-10-19T18:51:25.579 "LPub3D using Native render rendered page 3. Elapsed time: 16.546 seconds" 
INFO 2020-10-19T18:51:25.579 "Counting document pages..." 
TRACE 2020-10-19T19:19:43.395 "Paged content at index: [300], total lines: [2338], max lines: [300], load completed: [No]" 
TRACE 2020-10-19T19:20:09.597 "Paged content at index: [300], total lines: [2338], max lines: [300], load completed: [No]" 
TRACE 2020-10-19T19:20:44.584 "Paged content at index: [300], total lines: [2338], max lines: [300], load completed: [No]" 
TRACE 2020-10-19T19:21:28.617 "Paged content at index: [300], total lines: [2338], max lines: [300], load completed: [No]" 
TRACE 2020-10-19T19:22:20.612 "Paged content at index: [300], total lines: [2338], max lines: [300], load completed: [No]" 

I'm wondering if the "300 lines" is some kind of cache limit? Is there a way I can increase this to suit my large model?

trevorsandy commented 3 years ago

Thank you for reporting this behaviour.

The "300" max lines refers to the new buffered paging enhancement introduced in v2.4.0 - see #442 for further details.

The log you shared appear to indicate that the editor load is failing to advance the pages as expected. This is indicated by the 'Paged content at index: [300]...' lines where [300] should be increased by that amount for each new line to indicate the total number of lines loaded to display the specified submodel step. For example the content at index should be [300], [600], [900]... and the last indicator 'load completed [No]' should switch to [Yes] on having loaded the lines containing the specified step.

As you can see in the referenced ticket above, you can disable the paging capability from the new Settings menu item on the LDraw Editor toolbar.

I will take a look - perhaps I broke something while adding new behaviour to the editor.

Cheers,

AdvancedStyle commented 3 years ago

Thanks, turning off the buffering seems to fix that for me, runs much faster now.

trevorsandy commented 3 years ago

Good to see you are progressing.

I will reopen this ticket because, from the log you shared, it looks like buffered paging is not behaving as expected.

Cheers,

trevorsandy commented 3 years ago

Fixed.

Cheers,