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

LDView rendering has gotten very slow #318

Closed
snakebyte73 opened this issue Jul 15, 2019 · 21 comments
Closed

LDView rendering has gotten very slow #318

snakebyte73 opened this issue Jul 15, 2019 · 21 comments
Assignees
Labels

Comments

@snakebyte73
Copy link

@snakebyte73 snakebyte73 commented Jul 15, 2019

Subject

Rendering has gotten very slow with LDView.
Is there a preferred setting for LDView rendering to make it faster as it used to be ??

Environment

  • Version of LPub3D: 2.3.12 Revision 0 Build 1356
  • Operating system: Windows 10 x64

Configuration

[Note: Provide details and content below as needed with appropriate redactions. To produce the Windows registry extract for an installed distribution, go to the command console and enter the command line shown. The extract file will be placed on your desktop.]

  • LPub3D installation path

    • Windows: C:\Program Files\LPub3D\LPub3D.exe
  • Application data path

    • Windows: %USERPROFILE%\AppData\Local\LPUb3D Software\LPub3D\
  • Renderer configuration files
    ldview.zip

Screenshots

billede

billede

billede

@trevorsandy trevorsandy self-assigned this Jul 21, 2019
@trevorsandy

This comment has been minimized.

Copy link
Owner

@trevorsandy trevorsandy commented Jul 21, 2019

Thank you for reporting this behaviour.

You can download the latest pre-release Continuous Build for Windows (installed and portable distributions), Linux AppImage, Ubuntu, Arch, Fedora and macOS to confirm if this behaviour is still present in your environment.

If the unexpected behaviour is present in the latest build, can you provide a copy of the LPub3D Logs showing a comparison between the previous and present performance for the same or similar model file?

Cheers,

@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 21, 2019

Hi Trevor
I installed the pre-release you suggestedd above.
I the rendered this page for comparison:
billede
I timed how long it would take to render the page and it took just under 12 minutes.
Usually in earlier versions this would have taken under a minute.
Here is the LPub3D log you asked for:
LPub3DLog.zip

Thanks

@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 22, 2019

Hi again.
Also I have noticed that if i eg. render page 1, go to page 2 and make ldview render it, then go back to page 1, it looks like LDView renders the whole page again even when LPub3D hasn't detected any changes in the file/page.
/Knud

@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 24, 2019

So I did a bit more digging into this problem and it is a bit strange.
I tried downgrading LPub3D to ealier versions and opening the file. But it did not 100% solve the problem with very long rendering times on the above page.
I then reinstalled the newest version you suggested Trevor.
I the removed all LPub commands in the steps and started over.
I have now reached the same page as above, and the render times was againg over 10 minutes.
I then tried deleting all pointers. This made the render times fall to about 4 minutes.
I then tried to remove all callouts and added the parts directly instead. This made no difference.
So i added all submodels and pointers againg and right-clicked on the page and cleared the cache.
Now I have render times between 3-4 minutes.
I dont know If LPub3D somehow messes up its cache as I create the pages in my instructions.
I tried loading an older MPD file into LPub3D and it has render times between 1-3 minutes on similar pages.
Still I think 3-4 minutes of render time pr. page is way to long. And it takes 3-4 minutes (minimum) every time it has to update the page eg. when I move a pointer.
Any thoughts?

@riazanovskiy

This comment has been minimized.

Copy link

@riazanovskiy riazanovskiy commented Jul 24, 2019

As a workaround, you could put the file and the cache on some ram disk to make things faster

@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 24, 2019

Disk IO is not the problem.
This is a faily new issue I have encountered.
I have now tried to clear all steps of callouts, pointers, multisteps etc.
I have then installed LPub3D-2.3.9.0.1228_20190418.
I have then tried to redo the same steps as I did with the newest version and render times pr page is between 1-3 minutes.
The step that for now has taken the longest Is the below with 8 pointers.
This has taken a 6 minutes and 20 seconds to render.
Just to test your suggestion I copied the projekt to my SSD disk and the render time for the same page is 6 minutes and 5 seconds. So I dont think it os an IO problem.
And as I have to move two callouts and 8 pointers it takes a long time to finish this page as LPub3D renders everything everytime something is moved.
In the newest version of LPub3D the same page took more than 12 minutes to render

billede

@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 24, 2019

On this model it looks like LPub3D-2.3.9.0.1228_20190418 takes about 30 seconds pr. pointer and pr. subfile.
On a page like the above with two steps but no pointers and subfiles it takes a little under 2 minutes to render the page.
And on the pre-release Trevor recommended I used it takes a little over 1 minute pr. pointer and subfile.

@trevorsandy

This comment has been minimized.

Copy link
Owner

@trevorsandy trevorsandy commented Jul 24, 2019

Each pointer triggers a special blue on white render of the assembly image to determine the position of the pointer tip. So the number of pointers affect the duration of the overall render process. To optimise performance, the Native renderer should always be used for the blue on white position renders regardless of the preferred renderer setting. Perhaps I’ve inadvertently changed this behaviour somewhere between 2.3.9 and 2.3.12. The position renders are only logged in debug mode so it is not possible to see which renderer is being used by looking at the log. I’ll take a look.

I’ve also updated the LDView renderer in the latest continuous build (r49) which, I believe adds a bit of performance improvement.

Can you share an example model file with the configuration of the illustrations shown above ? If you prefer to send it via PM, my email is in CREDITS which you can access from the Help->About LPub3D menu.

@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 24, 2019

Hi Trevor
Thanks for the reply.
I have allways used LDView as renderer.
When I try to use native render I get an error - regardless of version of LPub3D
I will mail you the file.
billede

@trevorsandy

This comment has been minimized.

Copy link
Owner

@trevorsandy trevorsandy commented Jul 24, 2019

Knud, the message you show is because the Native renderer uses different camera settings than the 'L3P' camera globe based settings used by LDView (and LDGLite). This message would display if you actually change your preferred renderer to Native and your model file contains 'L3P' settings - this was not the point of my post.

My point was to say when generating a step with assembly pointers (callout, page, divider etc...), LPub3D will automatically switch (including the appropriate camera settings) to the Native render to generate the blue on white images used to calculate pointer tip position. This behaviour is completely transparent to the user except for the amount of processing time relative to the number of pointers.

FYI, you can look in the Assembly Global Setup to see the difference in camera setting parameters between Native and LDView:

LDView:
Screenshot - 24_07_2019 , 17_31_21

Native:
Screenshot - 24_07_2019 , 17_33_23

If your model file does not specifically define any of these metas, then switching between renders will occur without issue.

Cheers,

@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 25, 2019

I have now tried to start LPub3D as local admin on my windows 10 and now it is flying :)
A page that took over an hour to render using my normal non-admin user took under 2 minutes to make as admin.
So perhaps the long render times i encounter has to to with ressources my user has no access to anymore??

@trevorsandy trevorsandy added this to the v2.3.13 milestone Jul 25, 2019
@trevorsandy

This comment has been minimized.

Copy link
Owner

@trevorsandy trevorsandy commented Jul 25, 2019

Knud,

Thank you for the update. It's good to see you are progressing. Your status is in line with my findings so far. I added some debug statements to track the page render elapsed time and they consistently show times in keeping with approximately 1-2 mins to regenerate all your pointer tip positions (render the blue on white images) and CSI images.

Cheers,

@trevorsandy trevorsandy added this to DONE in LPub3D Maintenance via automation Jul 25, 2019
@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 25, 2019

My issuse is still remains.
So in order for LPub3D to work properly it has to run as local admin?
The LPub3D folder that is created in my admin account when installing has been copied over to my user account.
Is there anything else I need to do?
Thanks

@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 25, 2019

I have found the problem.
If I delete the HKEY_CURRENT_USER\Software\LPub3D Software\LPub3D\MainWindow hive in registry prior to starting LPub3D in my user everything works fine.
billede

But When I close LPub3D and start it again without changing anything in the settings the problem returns with slow rederings.
If I close LPub3D and delete the Registry hive again and start LPub3D it works again.

@trevorsandy

This comment has been minimized.

Copy link
Owner

@trevorsandy trevorsandy commented Jul 25, 2019

Knud, this useful new information. I’ll take a look.

Cheers,

@trevorsandy trevorsandy reopened this Jul 25, 2019
LPub3D Maintenance automation moved this from DONE to IN PROGRESS Jul 25, 2019
@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 25, 2019

Export of MainWindow Registry Hive
MainWIndow.zip

@trevorsandy

This comment has been minimized.

Copy link
Owner

@trevorsandy trevorsandy commented Jul 26, 2019

Launch a command prompt as the user that installed LPub3D and delete this registry key before starting LPub3D...

c:\> reg delete HKEY_CURRENT_USER\Software\LPub3D Software\LPub3D\MainWindow /v PartSelectionSplitter /f

Let me know if the expected performance is restored after performing this update.

Cheers,

@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 26, 2019

Hi Trevor
I tried deleting one value at a time and restoring the whole key between tests and got the following:
Deleting PartSelectionSplitter had no effect.
Deleting State value did.
Deleting Size value has no effect
Deleting Geometry has no effect

@trevorsandy

This comment has been minimized.

Copy link
Owner

@trevorsandy trevorsandy commented Jul 26, 2019

State is used to save and restore the current state of this mainwindow's toolbars and dockwidgets. It’s a bit strange that on restore, your LDView render performance is degraded. Is LDGLite also performing slowly ? Considering render performance is optimal when using the admin user, perhaps there is something amiss with launching external processes, which is what’s used to invoke these renderers, as your logged in user.

Cheers,

@snakebyte73

This comment has been minimized.

Copy link
Author

@snakebyte73 snakebyte73 commented Jul 26, 2019

LDGlite does not seem to be affected.
And it was my ignorance that in earlier comments stated that it worked as admin.
It was because it was the first time I had started LPub3D as admin = no state value i registry.
Second time I started it as admin it was just as slow as when run in my credentials.

@trevorsandy trevorsandy removed this from the 2.3.13 milestone Sep 10, 2019
@trevorsandy trevorsandy moved this from IN PROGRESS to DONE in LPub3D Maintenance Oct 9, 2019
@trevorsandy trevorsandy moved this from DONE to IN PROGRESS in LPub3D Maintenance Oct 9, 2019
@trevorsandy

This comment has been minimized.

Copy link
Owner

@trevorsandy trevorsandy commented Oct 31, 2019

Stale.

Cheers,

LPub3D Maintenance automation moved this from IN PROGRESS to DONE Oct 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
3 participants
You can’t perform that action at this time.