Re: Reordering opened windows
On 20/08/14 17:50, Ehsan Akhgari wrote: >> A hide/show pair after that might also be sufficient, but I assume >> something that simple was tried already. > > This is also interesting. This maps to nsWindow::Show(false/true). Yes, I believe that this would work, but I didn't try it in practice, as I'm pretty sure it would cause flickering. -- David Rajchenbach-Teller, PhD Performance Team, Mozilla signature.asc Description: OpenPGP digital signature ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Reordering opened windows
On 2014-08-20, 10:54 AM, Katelyn Gadd wrote: Has anyone tried SetWindowPos? It has a mechanism for altering the windows z-order, which determines the order in which windows are enumerated. That should affect ordering in the taskbar. Hmm, interesting. SetWindowPos is what nsWindow::PlaceBehind uses, so perhaps you could try that, David? A hide/show pair after that might also be sufficient, but I assume something that simple was tried already. This is also interesting. This maps to nsWindow::Show(false/true). ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Reordering opened windows
Has anyone tried SetWindowPos? It has a mechanism for altering the windows z-order, which determines the order in which windows are enumerated. That should affect ordering in the taskbar. A hide/show pair after that might also be sufficient, but I assume something that simple was tried already. On Wed, Aug 20, 2014 at 7:41 AM, David Rajchenbach-Teller wrote: > No success, I take it? > > On 04/07/14 20:11, Ehsan Akhgari wrote: >> I'm not aware of any such APIs, but CCing some other folks who know more >> about Windows than I do. >> > > > -- > David Rajchenbach-Teller, PhD > Performance Team, Mozilla > > > ___ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Reordering opened windows
No success, I take it? On 04/07/14 20:11, Ehsan Akhgari wrote: > I'm not aware of any such APIs, but CCing some other folks who know more > about Windows than I do. > -- David Rajchenbach-Teller, PhD Performance Team, Mozilla signature.asc Description: OpenPGP digital signature ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Reordering opened windows
The update of the taskbar preview (if this is possible) should normally happen after the tabs (the first, visible one) of a window are reloaded - not all previews at the end. IMHO the SessonStore should save a Time-Stamp to each window that gets updated each time the window gets focus. This Time-Stamp reflects the history the windows had focus. On a restore the prog should always re-read this Time-Stamps. So if the user gives immediately after the session-restore have started a other window then that that have the focus before the crash the focus, then this windows have the newest Time-Stamp and gets loaded first. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Improving Session Restore Experience (was Re: Reordering opened windows)
This would be my suggestion (if possible): 1. Read sessionstore.js; 2. Open first window, don't reload tabs, restore size on the right screen if multi-screen; 3. For each window in sessionstore.js, in the order in which the windows have been opened initially, trigger window opening; 4. After all windows are open, select them in the order they were last selected, last selected window as last and restore "max. window" if it was (on the right screen), restore "min. window" if it was; 5. Now restore tabs in windows in order the windows where opened last, last selected window as first, then back (maybe manage resources like CPU and bandwidth via focus); 6. Try to update the preview in the taskbar without make windows big again. This should _really_ restore the FF Session as it was before. Tobias. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Improving Session Restore Experience (was Re: Reordering opened windows)
Hey all, here’s an illustrative video of the last option that David mentioned. http://cl.ly/2E0q3W3Y2S3h Note in particular, that the restoring of the background windows is not animated. — Philipp On 07 Jul 2014, at 06:43, David Rajchenbach-Teller wrote: > (Cc-ing Philipp Sackl, for UX feedback.) > > At the moment, the simplified algorithm is the following: > 1. Read sessionstore.js; > 2. Open first window; > 3. Synchronously, for each window in sessionstore.js, in the order in > which the windows have been opened initially, trigger window opening; > (Whenever a window is opened, restore its contents.) > > Drawbacks: > * all windows are racing for CPU, DOM, http cache, etc. which makes > startup jank and pretty much ensures that Firefox becomes usable only > once all windows have finished loading; > * weird on-screen activity during startup, with all these windows > showing up in an apparently arbitrary order, whether in front or in the > back. > > Ideally, I would like to change it as follows: > 1. Read sessionstore.js; > 2. Open first window; > 3. Open the window most likely to be used immediately (i.e. the most > recently used window); > 4. Asynchronously, once that window is restored, open in the background > the second window most likely to be used immediately; > 5. etc. > (Whenever a window is opened, restore its contents.) > > With this scheme, I believe that there are good chances that the user > will be presented with the right window immediately, that the window > will be usable faster and that the loading of other windows will take > place in the background, without distracting visual effects. > > However, we cannot do this as changing the order in which windows are > opened also changes their order in the Windows taskbar and, possibly, > their order in MacOS X desktops. > > Now, you are right, we can probably do as follows: > 1. Read sessionstore.js; > 2. Open first window; > 3. For each window in sessionstore.js, in the order in which the windows > have been opened initially, trigger window opening (hidden); > 4. Once we have opened the window that should appear first, make it > visible, restore its contents; > 5. Asynchronously, once that window is restored and the second window > has been opened, make it visible and restore its contents; > 6. etc. > > A bit more complicated, but it should provide almost the same result. > > Cheers, > David > > > On 06/07/14 11:08, Neil wrote: >> David Rajchenbach-Teller wrote: >> >>> We are considering redesigning slightly how windows are reopened by >>> Session Restore, to ensure that most recently used windows are loaded >>> first. >>> >>> >> I can't quite tell from your phrasing whether the bottleneck here is the >> time it takes to open windows. I'm assuming it is, and that Session >> Restore has to wait for all the windows to open so that it can >> prioritise loading the most recent window first. >> >> Since Session Restore already knows things such as the size and position >> of the window it wants to restore, I'm wondering whether it might it be >> possible to open the windows to about:blank and then start loading >> browser.xul in the most recent window first. (Obviously this only helps >> if there are three or more windows to restore, since you have to have >> loaded browser.xul in the first window to know you want to restore the >> previous session.) >> > > > -- > David Rajchenbach-Teller, PhD > Performance Team, Mozilla > ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Reordering opened windows
Am Sonntag, 6. Juli 2014 11:08:22 UTC+2 schrieb Neil: > Since Session Restore already knows things such as the size and position > of the window it wants to restore, [...] Some experiences from Win7 64bit: - During use of FF, FF sometimes "reorder" the windows in my Taskbar. - FF saves the size of windows, but not, that it was maxed and the minimized. - Seems the first loaded windows will always be shown, even it was minimized before crash. - Sometimes a reloaded window comes always again in the foreground, until I have used and minimized it. And I don't know if things like maximized, minimized to try or the screen, that the window used (on multi-screen - I don't have one ATM) is really saved and will be restored ... Greets, Tobias. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Reordering opened windows
On 2014-07-04, 7:38 AM, David Rajchenbach-Teller wrote: Hi, We are considering redesigning slightly how windows are reopened by Session Restore, to ensure that most recently used windows are loaded first. I believe that, in many cases, this would enable users to start browsing faster. Do we have data on how many users have multiple windows? I expect that we have very few such users, but data will carry the day. I'm mostly asking out of interest, because even if we have few multiple window users, those users probably have lots of tabs. That's a good proxy for being a "power user", and likely one who cares about restore responsiveness. Nick ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Improving Session Restore Experience (was Re: Reordering opened windows)
Seems to me there are advantages to the "more complicated" version anyway. Whilst it is reasonable to load the contents of the window they are likely to use first, I'm not sure it follows that you can avoid displaying the other windows until the first is finished loading. I imagine users could be unhappy if it takes a significant amount of time before some of their windows even appear. The thought process could go "where has my other window gone?! Oh no, did session restore not save it?!... Oh wait, there it is. phew." Perhaps the other windows could be created and displayed with a "Loading contents, please wait." message, that way, if we have a really slow and complicated session to restore, the user isn't left lacking any clue as to whether they are getting all their windows back. Of course, this assumes creating and displaying the windows isn't the costly part. On Monday, July 7, 2014 11:43:50 AM UTC+1, David Rajchenbach-Teller wrote: > Now, you are right, we can probably do as follows: > > 1. Read sessionstore.js; > > 2. Open first window; > > 3. For each window in sessionstore.js, in the order in which the windows > > have been opened initially, trigger window opening (hidden); > > 4. Once we have opened the window that should appear first, make it > > visible, restore its contents; > > 5. Asynchronously, once that window is restored and the second window > > has been opened, make it visible and restore its contents; > > 6. etc. > > > > A bit more complicated, but it should provide almost the same result. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Improving Session Restore Experience (was Re: Reordering opened windows)
(Cc-ing Philipp Sackl, for UX feedback.) At the moment, the simplified algorithm is the following: 1. Read sessionstore.js; 2. Open first window; 3. Synchronously, for each window in sessionstore.js, in the order in which the windows have been opened initially, trigger window opening; (Whenever a window is opened, restore its contents.) Drawbacks: * all windows are racing for CPU, DOM, http cache, etc. which makes startup jank and pretty much ensures that Firefox becomes usable only once all windows have finished loading; * weird on-screen activity during startup, with all these windows showing up in an apparently arbitrary order, whether in front or in the back. Ideally, I would like to change it as follows: 1. Read sessionstore.js; 2. Open first window; 3. Open the window most likely to be used immediately (i.e. the most recently used window); 4. Asynchronously, once that window is restored, open in the background the second window most likely to be used immediately; 5. etc. (Whenever a window is opened, restore its contents.) With this scheme, I believe that there are good chances that the user will be presented with the right window immediately, that the window will be usable faster and that the loading of other windows will take place in the background, without distracting visual effects. However, we cannot do this as changing the order in which windows are opened also changes their order in the Windows taskbar and, possibly, their order in MacOS X desktops. Now, you are right, we can probably do as follows: 1. Read sessionstore.js; 2. Open first window; 3. For each window in sessionstore.js, in the order in which the windows have been opened initially, trigger window opening (hidden); 4. Once we have opened the window that should appear first, make it visible, restore its contents; 5. Asynchronously, once that window is restored and the second window has been opened, make it visible and restore its contents; 6. etc. A bit more complicated, but it should provide almost the same result. Cheers, David On 06/07/14 11:08, Neil wrote: > David Rajchenbach-Teller wrote: > >> We are considering redesigning slightly how windows are reopened by >> Session Restore, to ensure that most recently used windows are loaded >> first. >> >> > I can't quite tell from your phrasing whether the bottleneck here is the > time it takes to open windows. I'm assuming it is, and that Session > Restore has to wait for all the windows to open so that it can > prioritise loading the most recent window first. > > Since Session Restore already knows things such as the size and position > of the window it wants to restore, I'm wondering whether it might it be > possible to open the windows to about:blank and then start loading > browser.xul in the most recent window first. (Obviously this only helps > if there are three or more windows to restore, since you have to have > loaded browser.xul in the first window to know you want to restore the > previous session.) > -- David Rajchenbach-Teller, PhD Performance Team, Mozilla signature.asc Description: OpenPGP digital signature ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Reordering opened windows
It seems like the solution to this would be for the first opened window to trigger the session restore, and the session restore process goes like this: 1. Open additional win32 windows in the correct order 2. Load the basic browser XUL into each window 3. Bring the 'priority load'/active window to the foreground (*not* reorder it, just focus it) - iirc on Win32 this will work if Firefox is currently focused, and if it's not focused it will not work but the user won't notice. 4. Load tabs into the priority load window until you're done. 5. Load tabs into the non-priority load windows. That seems like it would ensure that the active window (the one the user is most likely to want to browse with, and the one that will be focused) loads and becomes responsive first while the other windows load in the background. On Sun, Jul 6, 2014 at 2:08 AM, Neil wrote: > David Rajchenbach-Teller wrote: > >> We are considering redesigning slightly how windows are reopened by >> Session Restore, to ensure that most recently used windows are loaded first. >> > > I can't quite tell from your phrasing whether the bottleneck here is the > time it takes to open windows. I'm assuming it is, and that Session Restore > has to wait for all the windows to open so that it can prioritise loading > the most recent window first. > > Since Session Restore already knows things such as the size and position of > the window it wants to restore, I'm wondering whether it might it be > possible to open the windows to about:blank and then start loading > browser.xul in the most recent window first. (Obviously this only helps if > there are three or more windows to restore, since you have to have loaded > browser.xul in the first window to know you want to restore the previous > session.) > > -- > Warning: May contain traces of nuts. > > ___ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Reordering opened windows
David Rajchenbach-Teller wrote: We are considering redesigning slightly how windows are reopened by Session Restore, to ensure that most recently used windows are loaded first. I can't quite tell from your phrasing whether the bottleneck here is the time it takes to open windows. I'm assuming it is, and that Session Restore has to wait for all the windows to open so that it can prioritise loading the most recent window first. Since Session Restore already knows things such as the size and position of the window it wants to restore, I'm wondering whether it might it be possible to open the windows to about:blank and then start loading browser.xul in the most recent window first. (Obviously this only helps if there are three or more windows to restore, since you have to have loaded browser.xul in the first window to know you want to restore the previous session.) -- Warning: May contain traces of nuts. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: Reordering opened windows
On 2014-07-04, 10:38 AM, David Rajchenbach-Teller wrote: Hi, We are considering redesigning slightly how windows are reopened by Session Restore, to ensure that most recently used windows are loaded first. I believe that, in many cases, this would enable users to start browsing faster. However, this has been tried in the past and reverted because it caused windows to appear in the Windows taskbar in an order unpredictable by power users. Is anyone aware of an APIs that could be used to change the order of Windows in the taskbar? The only one I know of is ShowWindow and it is my understanding that using it would cause ugly flicker. I'm not aware of any such APIs, but CCing some other folks who know more about Windows than I do. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Reordering opened windows
Hi, We are considering redesigning slightly how windows are reopened by Session Restore, to ensure that most recently used windows are loaded first. I believe that, in many cases, this would enable users to start browsing faster. However, this has been tried in the past and reverted because it caused windows to appear in the Windows taskbar in an order unpredictable by power users. Is anyone aware of an APIs that could be used to change the order of Windows in the taskbar? The only one I know of is ShowWindow and it is my understanding that using it would cause ugly flicker. Cheers, David -- David Rajchenbach-Teller, PhD Performance Team, Mozilla signature.asc Description: OpenPGP digital signature ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform