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

Thumbnails load slowly #35

Closed
gregzaal opened this issue Nov 28, 2022 · 12 comments
Closed

Thumbnails load slowly #35

gregzaal opened this issue Nov 28, 2022 · 12 comments

Comments

@gregzaal
Copy link
Member

gregzaal commented Nov 28, 2022

I'm creating this thread to gather feedback from users who experience slowly loading thumbnails in Blender's asset browser.

I'm unable to reproduce this issue. Here's a screen recording of how it looks like for me using a low-end Sata SSD from a freshly downloaded library and after restarting Blender:

2022-11-28_06-48-39.mp4
@gregzaal
Copy link
Member Author

We use the webp image format for thumbnails, which is a relative newly supported format in Blender - it's generally at least as small as JPG but supports transparency like PNG.

As a test to see if this is the cause of the problem for you, try edit these two lines in operators/pull_from_polyhaven.py:

image

In the first line, replace .webp with .png, and in the 2nd line, add &format=png to the end of the string.

Then:

  1. Delete your whole asset library
  2. Restart Blender
  3. Fetch the assets again

Let me know if that's any better than before.

@rafstahelin
Copy link

sorry, how do i go into the above window for re-coding? dont recognise. above paygrade i am afraid, but will try

@optimus007
Copy link

can this webP to png change be done without deleting all the assets ?

@gregzaal
Copy link
Member Author

No sorry.

@rafstahelin
Copy link

rafstahelin commented Dec 23, 2022 via email

@badbunny-uk
Copy link

badbunny-uk commented Dec 29, 2022

Hi, I'm having issues with slow thumbnail loading / blender freezing / not all thumbnails showing (Blender 3.4.0, Windows 10, 32GB RAM, 8GB Nvidia RTX 4000). This only seems to affect the polyhaven library, not others I've got.

I tried changing the webp thumbnails to png but there was no change in behaviour. I also tried again reducing the 256 size thumbnail download to 128, but that also doesn't change the behaviour. It seems that whenever I click on any of the polyhaven folders, even low down in the structure, there is typically like a 5-20+ second delay during which time there is nothing apparently happening with blender (3.4.0), but if I try clicking on the blender window it says not responding (in Windows 10). Sometimes it comes up with not responding on its own after a while. The delay doesn't seem to change if I click on lower or higher level folders, ie it doesn't seem to change with the quantity of thumbnails being displayed in that folder (is the code doing something that processes all files before it displays the subset?). I've also noticed that not all thumbnails are showing when I browse 'All' but if I look in lower folders those missing thumbnails are shown properly, and when I go back out to 'All' those are now shown, but others are now missing that were showing previously.

One other suspect behaviour - when I try to delete all of the files from the polyhaven assets folder (after running blender, but with blender closed) it causes the file deletion process window to get stuck with just the blender_assets.cats.txt file remaining. I have to kill and restart the Explorer task to get past that. Not sure if this is related, but potentially?

For reference if anyone else wants to try to see if this helps (in Windows 10), the following instructions are expanded from Greg's post above:

  1. Close blender if already open
  2. Go to: C:\Users\your_username_here\AppData\Roaming\Blender Foundation\Blender\3.4\scripts\addons\polyhavenassets\operators (if you are running 3.4)
  3. Edit the 'pull_from_polyhaven.py' text file as per Greg's code screenshot above (the red shaded lines are what should be there already, and the green shaded lines are what you need to edit those to - don't have both!) - I suggest you copy that file before editing it so you can replace it with the original after
  4. Go to your polyhaven asset library folder and delete all of its contents
  5. Restart blender, and go to the polyhaven asset library and click the fetch assets button at the top

If this doesn't solve the issue, you can revert back to the original settings by following all steps again, but at step 3 replace your modified file with the original one.

@gregzaal
Copy link
Member Author

Thanks for the feedback - now we can be sure it's a general issue with the asset browser and not related to the WEBP format type. Could you please add your feedback to the Blender bug report to help the devs narrow it down?

One other suspect behaviour - when I try to delete all of the files from the polyhaven assets folder (after running blender, but with blender closed) it causes the file deletion process window to get stuck with just the blender_assets.cats.txt file remaining. I have to kill and restart the Explorer task to get past that. Not sure if this is related, but potentially?

I experience this too! I also figured it was something odd with my setup (explorer hanging on me for various reasons is quite common, outside of Blender related stuff), but maybe this is a related bug in Blender as well?

@badbunny-uk
Copy link

Hi Greg, I've added my feedback to the bug report. Hopefully this will help sort it.
Pete,

@gregzaal
Copy link
Member Author

gregzaal commented Jan 24, 2023

Just an update, Campbell has committed a fix to Blender a few minutes ago that may address this issue. Let's wait a bit for the build bot to make a build that includes the change and then we can try it out.

@badbunny-uk
Copy link

badbunny-uk commented Jan 24, 2023

Just tried the overnight builds:

  • Blender 3.4.1 (ef9ca44dee7f) January 25, 03:23:51
  • Blender 3.5.0 - Alpha (0ad4d07f10e2) January 24, 03:58:17

Not sure if these have had that fix applied (pretty sure the 3.5 Alpha doesn't from it's build date).
The performance problems I'm having are unchanged with these.

Pete.

@optimus007
Copy link

optimus007 commented Jan 29, 2023

i tried at latest 3.5 build 29-jan-2023 and the thumbnails seem to be loading much faster , and the lag on second time refresh is gone + blender does not become super laggy while the thumbnails load

2023-01-29.18-09-42.mp4

@gregzaal
Copy link
Member Author

gregzaal commented Aug 3, 2023

I haven't heard any further reports of this being an issue, so I'm assuming the problem was solved :)

@gregzaal gregzaal closed this as completed Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants