Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    Jun 2010
    Location
    Warsaw
    Posts
    850

    could the viewport stats slow blender?

    Hi all. Today at work my colleague was showing me a problem he had in 3d studio with the viewport speed. Usually 3dstudio has a pretty fast viewport, but in a particular scene he couldnt get a fluid viewport. After a while he realized that he had turned on the viewport stats (n. of vertex, faces and so on) and this was the reason of the slow viewport. Once he turned that off everything was super smooth.

    Now... I have to say I am totally ignorant with this stuff, but it came up in my head that blender has costantly visible this viewport stats. Probabily it has nothing to do with it, but I thought that there could be some kind of connection with the fact the blender viewport is so slow. I don't know... maybe is tought to calculate this stats all the time...

    I know I know... if it would be so simple probably they would have already fixed that... but still I thought to give this a try...

    Any thought of this from someone more expert on the topic?

    Thanks!



  2. #2
    Member Harley's Avatar
    Join Date
    Sep 2007
    Location
    Duncan, British Columbia, Canada
    Posts
    1,244
    It is pretty easy to test this.

    In your "scripts" folder is a "startup" folder that contains another folder called "bl_ui". Open up "space_info.py" in any text editor. At about line 68 you will see a line that says something like this:

    Code:
            row.label(text=scene.statistics())
    Just add a "#" in front of it and it become a comment and will no longer be called.

    Code:
            # row.label(text=scene.statistics())
    Relaunch Blender, see that the header info is not displayed and do some testing.



  3. #3
    Member
    Join Date
    Jun 2010
    Location
    Warsaw
    Posts
    850
    thanks for the info... I tested it and unluckly it looks like 3dstudio hasn't got a nice coding for what concern the viewport info calculations, because in blender it doesn't make difference having them or not. I am not sure if I was gathering something like half fps sometimes, but id say is merely the same.

    I thought so... but it was good to try.

    Just to do things right... does the deactivating the command you told me just make the stats hidden, or does it actually make blender stop calculating them? because i think this makes difference...



  4. #4
    Member Harley's Avatar
    Join Date
    Sep 2007
    Location
    Duncan, British Columbia, Canada
    Posts
    1,244
    No, it doesn't just hide the stats. Disabling that line stops the information lookup and formatting from happening.

    So you're using Blender and make some change that makes it necessary to update the header and that bit of Python is called. The line that you commented out runs fast "C" code to get the information from Blender's internal structures, formats it into a string and gives it back to Python to display on the header.

    It's not called as often as you might guess. It is not as if when you select 10,000 faces that it calls something 10,000 times, only the once. And this isn't really stuff that Blender has to "calculate" much; it doesn't have to manually count up these things whenever it is asked for. Instead there are structures that are always keeping track of how many objects there are in scene, how many faces are selected, etc. This information is quickly available because it has to be for so many other uses.



  5. #5
    Member
    Join Date
    Jun 2010
    Location
    Warsaw
    Posts
    850
    ok thank you very much for the explanaition. It was too simple and silly to be true . But I guess trying does not hurt!



  6. #6
    Member Harley's Avatar
    Join Date
    Sep 2007
    Location
    Duncan, British Columbia, Canada
    Posts
    1,244
    Not silly at all.

    When you asked I had *assumed* that you wouldn't find much to it, but I still had some niggling doubts. In fact it would have been pretty cool if you had found that there was a performance problem in there to investigate. I'm really glad you went through the trouble to test it. Now we know for sure.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •