Update 2:
I rewrote a dock widget containing most of the components of the ImageView 
(minus normalization and an roi, plus a few other custom bits). Widget 
creation is now very fast with fairly constant creation time up to more 
than 30 widgets. Still haven't pinpointed the cause of the issue in 
pg.ImageView(), but making a bunch of them in a parent widget reproducibly 
exhibits the O(n^2) time behavior. If anyone is interested, I can post the 
code for the imageview dock, though, like I said it's basically the same 
base components that are in the pg.ImageView() class.


On Tuesday, September 24, 2019 at 12:47:29 PM UTC-4, Evan Groopman wrote:
>
> Correction: The same behavior happens regardless of whether the display 
> window is run standalone or as part of the main program, the behavior just 
> starts after creating many more ImageViews. This makes me think it is a 
> memory/cache issue, not something specific to ImageView. Any thoughts are 
> welcome, however.
>
> On Tuesday, September 24, 2019 at 10:58:23 AM UTC-4, Evan Groopman wrote:
>>
>> Hi, and thanks for your help.
>>
>> I've created an image analysis program consisting of a main window with a 
>> tabbed interface, where a particular image analysis widget is embedded in 
>> each tab. The embedded widgets are generally QMainWindows or QDialogs, 
>> which can also run independently (nice for debugging). Upon loading a file 
>> containing multiple images, one of the tabs contains a program that creates 
>> individual pyqtgraph docks, each containing an ImageView (docks and 
>> ImageViews are added in a simple loop). I've noticed some strange behavior, 
>> however:
>>
>> When running the display window standalone, each dock is created in <50ms 
>> (on my machine) and in ~the same time. When using this program within the 
>> main program, however, the time taken to create each dock and ImageView 
>> increases quadratically for each image, from 50ms to 1.5s (over 18 images). 
>> All of the dock creation code runs in the same time for each loop, except 
>> im = pg.ImageView(). I have a second tab program for creating image ratios, 
>> and I observe the same behavior here. After loading, the images are sent 
>> via a signal/slot mechanism to the subwindows.
>>
>> Cheers,
>> Evan
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pyqtgraph" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyqtgraph/bd3bb3f9-3195-43c3-861a-342a5b260e92%40googlegroups.com.

Reply via email to