GithubHelp home page GithubHelp logo

Comments (8)

GuillaumeFavelier avatar GuillaumeFavelier commented on June 11, 2024 1

Actually, let's leave it open similarly to #20 since it's more a workaround than a real fix.

from pyvistaqt.

JacobBumgarner avatar JacobBumgarner commented on June 11, 2024 1

Yes I will work to get a reproducible build for you. The plotter vs. interactor load times become drastically more apparent when rendering meshes that take > 60s on plotter.

When loading glyphed meshes, I experience no difference between plotter/Interactor. However, my issue comes when I add the Multiblocks I’m using that contain hundreds of spline.tubes; maybe it’s just an issue with my implementation of pyvista.

Thanks for being so helpful. This is an amazing library with such supportive devs. Will @ you when I have a build & some logs up. Cheers

from pyvistaqt.

JacobBumgarner avatar JacobBumgarner commented on June 11, 2024 1

@GuillaumeFavelier
Ok, I dramatized the 10s vs 60s. It's more like 10s vs 40s. I've further discovered that this issue seems to exclusively occur with .vtmb files, not .vtk files.

Please see the code here for event reproduction:

import pyvista as pv
from pyvistaqt import BackgroundPlotter

# Loading my network vtmb file here.
network = pv.read("network.vtmb")

# First add to plotter.
p = pv.Plotter()
p.add_mesh(network, scalars='Length (µm)', smooth_shading=True)
p.show()
p.close()

# Then add to background plotter after closing pv.plotter. Notice lag.
bp = BackgroundPlotter()
bp.add_mesh(network, scalars='Length (µm)', smooth_shading=True)
bp.app.exec()

And please see this link to download my example file.
I've excluded tube ends (the file is too big, ~100mb), which I separately glyph endpoints as spheres. If I just add the tube caps separately, I experience no difference between plotter and background load times.

See an example image of what the mesh looks like with caps below.

CapsOn

from pyvistaqt.

JacobBumgarner avatar JacobBumgarner commented on June 11, 2024

Similarly to #101, this seems to be due to issue with PyQt versions 5.14 >=

Not sure if I should mark this as closed or not... thoughts?

from pyvistaqt.

GuillaumeFavelier avatar GuillaumeFavelier commented on June 11, 2024

Hello @JBum21, thanks for reporting, I was not aware of this one.

this seems to be due to issue with PyQt versions 5.14 >=

How did you figure out?

Not sure if I should mark this as closed or not... thoughts?

Could you share your report before closing? It would be helpful for future reference, thank you.

python -c "import pyvista; print(pyvista.Report())"

from pyvistaqt.

JacobBumgarner avatar JacobBumgarner commented on June 11, 2024

Sounds good. Figured this out due to experimentation with #101. I’ll get the report to you as soon as I’m at my machine.

@GuillaumeFavelier
Since I have you here at the moment, can you help me with another question I have? Why is QtInteractor so much slower than the plotter?
Rendering a mesh using plotter takes around 10 seconds, whereas the QtInteractor can take north of 60s to unfreeze after adding the mesh. Is this just a known effect of integration into PyQt5 that VTKRenderWindowInteractor has? I can provide more details if needed.

Not sure if this is really a question worth opening an issue for.

from pyvistaqt.

GuillaumeFavelier avatar GuillaumeFavelier commented on June 11, 2024

This is not something that I investigated because I did not notice such a big difference. 60s instead of 10s is huge! Could you give more details about your benchmark in a different issue? It would be very convenient if you could produce a minimum working example to reproduce :)

unfreeze after adding the mesh

Hm... I guess it could be a delay in paintEvent or updateEvent.

from pyvistaqt.

JacobBumgarner avatar JacobBumgarner commented on June 11, 2024

@GuillaumeFavelier
Please see my PyVista report log below:

--------------------------------------------------------------------------------
  Date: Fri May 07 09:38:47 2021 EDT

                OS : Darwin
            CPU(s) : 12
           Machine : x86_64
      Architecture : 64bit
               RAM : 16.0 GB
       Environment : Python
        GPU Vendor : ATI Technologies Inc.
      GPU Renderer : AMD Radeon Pro 5500M OpenGL Engine
       GPU Version : 4.1 ATI-4.2.15

  Python 3.8.8 (default, Feb 27 2021, 02:19:17)  [Clang 12.0.0
  (clang-1200.0.32.29)]

           pyvista : 0.29.1
               vtk : 9.0.0
             numpy : 1.20.1
           imageio : 2.9.0
           appdirs : 1.4.4
            scooby : 0.5.6
            meshio : 4.3.11
        matplotlib : 3.4.0
         pyvistaqt : 0.3.0
             PyQt5 : 5.13.2
           IPython : 7.22.0
          colorcet : 1.0.0
             scipy : 1.6.2
        itkwidgets : 0.32.0
--------------------------------------------------------------------------------

from pyvistaqt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.