How to show the window as quickly as possible?

I have 3 main windows in my Xulrunner application that will be accessed very often. The application works in a very slow system, so before the window appears, I see a completely black box, and then a window appears that fills this black area.

Since I’m in the embedded system, and the "Minimize" animation is not shown, I closed the window and did not close it, but it still does not appear as fast as I wanted.

Is there a way to let the window load into the buffer so that it appears faster? Or, how can I display this window as quickly as possible?

- update

By the way, there is nothing heavy in the windows. One of them is a pop-up window labeled “Download,” and I still need a lot of time (about a second):

<?xml version="1.0" encoding="UTF-8"?> <!-- Style --> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="loadingWindow" hidechrome="true" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <vbox pack="center" align="center"> <label id="textLabel">Loading...</label> </vbox> </window> 

I open it with

 openDialog("chrome://myapp/content/loading.xul", 'Loading', 'chrome, popup, centerscreen'); 
+6
source share
3 answers

Can you create your own code? createHiddenWindow ()

Alternatively, you can play with creating a tiny transparent window with chrome hidden

It is not complete, but for starters:

 <?xml version="1.0"?> <!--<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>--> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" width="1px" height="1px" hidechrome="true" style="max-width:1px; max-height:1px; opacity:0"> <description>blar</description> </window> 
+3
source

You can’t just swap all the elements from the main window and replace them with the elements of the window you want to show? or probably even better, something similar with a deck ?

+1
source

I'm not sure if this is what you want, but you can temporarily hide the window so that when you want it you can just show it again. For a general idea, see nsMsgComposeService :: ShowCachedComposeWindow .

0
source

Source: https://habr.com/ru/post/887129/


All Articles