how to GUI show data in fraction of seconds for large data sets
-
I have put the formatted code in the link . PLease review
-
Can we discuss PyQt over here , I have made a prototype
@Qt-Enthusiast said in how to GUI show data in fraction of seconds for large data sets:
Can we discuss PyQt over here
If you really want to have good performance for millions of nodes, Python is not the best choice for that. It does help that Qt will handle most of the heavy lifting and is written in C++. You might get lucky with you
paint
function and it will quickly be optimized by the interpreter, but there is no guarantee. Performance-critical code should not be written in an interpreted language. (That being said: Measure first before optimizing prematurely.) -
I have put the formatted code in the link . PLease review
@Qt-Enthusiast said in how to GUI show data in fraction of seconds for large data sets:
I have put the formatted code in the link . PLease review
Tip 1: Use the forum code button instead of an external website:
or format manually:
```
code goes here
```Tip 2: For python3, avoid super(Class, object) when super() will work. Can you spot the error? This is valid code, but probably not what is intended.
class Base: def __init__(self, *args, **kwargs): print("Base.__init__") class Mid(Base): def __init__(self, *args, **kwargs): super(Mid, self).__init__(*args, **kwargs) print("Mid.__init__") class Derived(Mid): def __init__(self, *args, **kwargs): super(Mid, self).__init__(*args, **kwargs) print("Derived.__init__") obj = Derived()
As for the general strategy, displaying or hiding visible items based on what is visible is the job of the view. Unless the overhead of non-viewable items in the scene is significant, don't remove them from the scene. One of the points of the chips demo is to alter the details of the visible items as appropriate, rather than removing or adding them.