Re: Responsive Splash Screen while creating GUI objects

johnf <[email protected]>
Newsgroups gmane.comp.python.wxpython
Message-ID <[email protected]>
I created a reasonably large app and was concerned about how long the 
app was taking to load.  So, as an experiment I create a frame with 
approx. 900 objects on a scroll panel.  It loaded in just a couple 
seconds - some times less on a windows 10 box.  It made me realize that 
it was not the wxPython GUI objects that was taking the time but my 
database connections.  I wonder if you are having the same issue as I did?

Python 3.6, wxPython 4.0.7, windows 10.

Johnf

On 5/12/20 7:03 AM, Jasper Alexion wrote:
>
> Hello,
>
>
> We are currently in the process of creating a splash screen for our 
> application and we are encountering a problem that causes the GUI to 
> become unresponsive.
>
>
> Our application has a very large GUI containing thousands of fields 
> and labels. Creating this GUI takes around 10 seconds. In the long 
> term we are working towards redesigning our application more towards 
> MVC, but as of now it is impossible to dynamically create the GUI when 
> needed.
>
> Goal:
>
>  1. We want a responsive splash screen while our application is starting.
>  2. Responsive means: draggable window, moving wx.Gauge, etc..
>
> 1.
>     2.
>
> Problem:
>
>  1. We can only create GUI objects from the GUI-thread that runs the
>     mainloop
>  2. When the mainloop is busy creating GUI objects, the WHOLE
>     application (at least the GUI part) freezes.
>
> 1.
>     2.
>
> Notes
>
>  1. We could use wx.Yield() to let the splash screen update itself.
>     However, this would result in a splash screen that sporadically
>     updates at random moments instead of being responsive at alltimes
>     with a nice smooth flowing wx.Gauge
>  2. Weareusing threads(wx.Timer,wx.PostEvent,wx.CallAfter)to keep
>     (parts of the) splash screen responsive, this works well during
>     normal operation. However, as soon as the mainloop is too busy to
>     handle wx events the whole GUI freezes.
>
> 1.
>     2.
>
> How could we achieve this?
>
> We are using Python 3.8.2and the following libraries:
>
> numpy==1.18.4
> Pillow==7.1.2
> Pypubsub==4.0.3
> six==1.14.0
> wxPython==4.1.0
>
> Thanks in advance,
>
> Jasper
>
> -- 
> You received this message because you are subscribed to the Google 
> Groups "wxPython-users" group.
> To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/wxpython-users/bf3743b8-79d1-463d-8b78-d447e206377a%40googlegroups.com 
> <https://groups.google.com/d/msgid/wxpython-users/bf3743b8-79d1-463d-8b78-d447e206377a%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups "wxPython-users" 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/wxpython-users/c9f4d697-70e0-f573-a33a-b9fe96646afc%40gmail.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.