MozillaZine

Session Manager 0.1 to 0.3.9+

Talk about add-ons and extension development.
mattcoz
 
Posts: 1015
Joined: November 7th, 2002, 11:15 pm

Post Posted March 15th, 2006, 1:37 pm

C@rb0n wrote:
mattcoz wrote:I posted this idea in the RestartFirefox thread, but it probably makes more sense here. I'd like a seperate option to save the session when restarting Firefox, as opposed to exiting normally. I know I could save it myself, but this would be nice to have.

Read zeniko's comment at the end of the Restart Firefox thread. Restart Firefox does not call a function that would let Session Manager know what's going on. If it did, Session Manager would properly support restoring session on restarting.

However, zeniko, is there not possibly a way Session Manager can work around this? For instance, Session Saver is able to restore sessions on restart in spite of Restart Firefox's flaws. Couldn't Session Manager determine that: no crash occurred but a "normal" exit did not occur, yet the browser did exit? I'm assuming you could detect this using a state variable with its value written to the session file and checked on the next read of the file.

I understand RestarFirefox's flaw, but assuming that is fixed there will still need to be a way for Session Manager to distinguish between a normal exit and a restart. Also, even if someone is not using the RestartFirefox extension, they still might want to save their session only when restarting, such as after a software update. This would be very useful for nightly updates.

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted March 15th, 2006, 1:54 pm

mattcoz wrote:I'd like a seperate option to save the session when restarting Firefox, as opposed to exiting normally.

The problem is that it's not really possible to make a difference between restarting and shutting down - or at least none that I'm aware of. The best I can offer you is to install Crash Recovery and then use the following keyconfig macro for restarting (of course this works also with Session Manager and/or MenuManipulator/Mouse Gestures):
Code: Select all
gPrefService.setBoolPref("extensions.crashrecovery.resume_session_once", true); var as = Components.interfaces.nsIAppStartup; if (canQuitApplication()) Components.classes["@mozilla.org/toolkit/app-startup;1"].
getService(as).quit(as.eRestart | as.eAttemptQuit); /* this code requires Crash Recovery 0.6.3.1 or Session Manager 0.3.5.2 */


dougeeebear wrote:From this, I take it that Firefox expects to keep on crashing in the future.
It's as if they know it crashes so much they have to include a crash recovery system.

Why so? They just know that Firefox isn't uncrashable (or would you have advised the Titanic not to carry life boats?). And don't let yourself fool by the name "Crash Recovery". That's what my extension was used for in the beginning. They'll rather include a "SessionStore", allowing to resume sessions when you have to restart after installing an extension. In fact, the first code added was the above mentioned pref I've now also introduced for my own extensions.

dougeeebear wrote:How about a Crash Prevention extension? :)

In my experience, crashes are mostly due to unstable nightly builds (which are expected to crash once in a while) and unstable plugins (against which Firefox can't really do that much). And in both cases, a simple extension couldn't do anything. Although... I could write you an extension which prevents you from starting Firefox. ;)

C@rb0n wrote:Session Saver is able to restore sessions on restart in spite of Restart Firefox's flaws. Couldn't Session Manager determine that: no crash occurred but a "normal" exit did not occur, yet the browser did exit?

It does determine that. However, at that point all windows are already closed (and all but the last one lost). SessionSaver allows for a certain time interval before final shutdown during which all closed windows are counted towards the current session. I've however already said that Session Manager won't go down that road (and I especially won't do so because of a buggy extension).

mattcoz
 
Posts: 1015
Joined: November 7th, 2002, 11:15 pm

Post Posted March 15th, 2006, 2:25 pm

zeniko wrote:And don't let yourself fool by the name "Crash Recovery". That's what my extension was used for in the beginning. They'll rather include a "SessionStore", allowing to resume sessions when you have to restart after installing an extension.
That would be great because that's basically what I was asking for.

Muescha
 
Posts: 53
Joined: February 17th, 2005, 9:18 am
Location: Germany

Post Posted March 16th, 2006, 9:35 am

im new here from SessionSaver ... i enjoy some of the different functions.

some function i miss a "real" manager like the bookmark manager or like the manager in ScrapBook

the small way would be nice a side-bar manager as a treeview of the sessions. importent for me ist, that i can do with the manager:

- move and reorder windows (incl. all tabs)
- move and reorder tabs inside windows
- move/reorder/copy tabs from one window to other

- delete tabs
- delete windows
- delete sessions

- select tab for opening
- select window for opening
- select session for opening

- rename saved sessions

- copy sessions


it may be look like this:


Code: Select all
+ Session Manager
|
|-+ [Last Session]
| |
| +- Window1
| | +- Tab1
| | +- Tab2
| | +- Tab3
| |
| +- Window2
| | +- Tab1
| | +- Tab2
| | +- Tab3
| |
| +- Window3
|   +- Tab1
|   +- Tab2
|   +- Tab3
|
+-- Backup 2006-03-16
| | +- Tab1
| | +- Tab2
| | +- Tab3
| | +- Tab4
| | +- Tab5
| |
| +- Window2
| | +- Tab1
| |
| +- Window3
|   +- Tab1
|   +- Tab2
|   +- Tab3
|
|
+-- Backup 2006-03-10
  | +- Tab1
  |
  +- Window2
  | +- Tab1
  | +- Tab2
  |
  +- Window3
    +- Tab1
    +- Tab2
    +- Tab3
 

********
 
Posts: 947
Joined: August 24th, 2005, 12:23 pm

Post Posted March 16th, 2006, 11:00 am

@Muescha: wow. this is a really sweet idea, but it would take a lot of code, i think.

(btw, i'm not the developer of session manager, just a happy user :))

alta88
 
Posts: 1000
Joined: January 28th, 2006, 3:08 pm

Post Posted March 16th, 2006, 11:53 am

yes indeed. that is a very nice idea. much smaller and liter in a menu tho.. ;)

Muescha
 
Posts: 53
Joined: February 17th, 2005, 9:18 am
Location: Germany

Post Posted March 16th, 2006, 3:22 pm

i think its just some steps:

create sideboard with tree root: exists in bookmark-manager
read data from file: already exist in SM
fill tree with data: new code: instead of opening the sites
reorder tree: functionality exists in bookmark-manager
read tree: new code
save data: already exists

you can decide two different ways in temporaly storing the data:
1) hold all read data in objects in memory - after a change: save data from objects in memory

2) hold only indizes at the tree - only after a change: read the appropriate data - save data with the new order

AnonEmoose
 
Posts: 2031
Joined: February 6th, 2004, 11:59 am

Post Posted March 16th, 2006, 6:37 pm

Muescha wrote:im new here from SessionSaver ... i enjoy some of the different functions.

some function i miss a "real" manager like the bookmark manager or like the manager in ScrapBook

the small way would be nice a side-bar manager as a treeview of the sessions. importent for me ist, that i can do with the manager:

- move and reorder windows (incl. all tabs)
- move and reorder tabs inside windows
- move/reorder/copy tabs from one window to other

- delete tabs
- delete windows
- delete sessions

- select tab for opening
- select window for opening
- select session for opening

- rename saved sessions

- copy sessions


it may be look like this:


Code: Select all
+ Session Manager
|
|-+ [Last Session]
| |
| +- Window1
| | +- Tab1
| | +- Tab2
| | +- Tab3
| |
| +- Window2
| | +- Tab1
| | +- Tab2
| | +- Tab3
| |
| +- Window3
|   +- Tab1
|   +- Tab2
|   +- Tab3
|
+-- Backup 2006-03-16
| | +- Tab1
| | +- Tab2
| | +- Tab3
| | +- Tab4
| | +- Tab5
| |
| +- Window2
| | +- Tab1
| |
| +- Window3
|   +- Tab1
|   +- Tab2
|   +- Tab3
|
|
+-- Backup 2006-03-10
  | +- Tab1
  |
  +- Window2
  | +- Tab1
  | +- Tab2
  |
  +- Window3
    +- Tab1
    +- Tab2
    +- Tab3
 
In my opinion this looks like a neat idea in theory and looks real nice, but all it really is the regular browsing 'history' [or for trunk buils, Places (history)]presented in a different view (as opposed to LastVisited/Group By Site etc).

As such, I find that in practice it would be inefficient and clumsy (though looking realy nice).

In my view, you'd be better off extending Places "history" to accomplish this as opposed to incorporating it in SessionManager.......

Then again you might disagree .... lol

Muescha
 
Posts: 53
Joined: February 17th, 2005, 9:18 am
Location: Germany

Post Posted March 17th, 2006, 5:47 am

i disagree.

it is not another history, because it not uses the data from the history.


it is a handy easy managment tool for the saved sessions from sessionmanager.

otherwise you have no chance to access only to parts of your saved sessions. it is like you look at blackboxes only with a saved name, but not more.

Elder Young

User avatar
 
Posts: 545
Joined: June 9th, 2004, 8:24 pm

Post Posted March 17th, 2006, 2:26 pm

Ever since I switched from SessionSaver to Session Manager, this forum seems to forget that I'm logged in any time that I close the browser. I haven't changed any about:config settings, I have cookies allowed for this site, and I allow JavaScript for this site. Any ideas why this might be happening and how I can fix it? I'm wondering if it isn't a profile issue since it doesn't happen with my other branch profile.
System: Core 2 Quad Q9650, 8GB RAM, Sapphire 5870 Toxic, Windows 7 Ultimate 64-bit, Flash 10.1.53.64, Java 1.6U21 B04

Dan Harkless

User avatar
 
Posts: 13
Joined: December 20th, 2005, 11:26 pm
Location: Orange County, California

Post Posted March 17th, 2006, 8:03 pm

After having SessionSaver lose yet another of my huge sessions last week, I came across a post about Session Manager and tried it out in my Firefox 1.5.0.1 on Windows XP (after uninstalling SessionSaver, of course).

Session Manager's actual session management seemed to be working well, but there is a major bug that drove me crazy and required me to uninstall it.

Intermittently, trying to type text in form fields would cause Firefox's find-as-you-type to get activated instead, and typing the form fields would be impossible (making the browser almost unusable). The first couple of times this happened, I was able to restore the page to proper functionality by reloading it, but on subsequent days I was unable to ever get a page to behave, once it started acting this way.

Note that I have a non-default setting in my Firefox: Advanced -> General -> Accessibility -> Begin finding when you begin typing. It would seem Session Manager has not been tested with this turned on.

Uninstalling Session Manager (and going back to SessionSaver) has, as expected, gotten rid of this behavior.

EoRaptor
 
Posts: 80
Joined: September 29th, 2003, 11:43 pm

Post Posted March 17th, 2006, 10:26 pm

Well, .3.6.1 does markeldy improve the time it takes to close a tab after restoring a session. For 8 windows of ten tabs each, it used to take 4 seconds to close any tab after restoring the session, no matter if it was a newly opened tab or an existing tab from the session. This is now about 1 seconds or so, which is much better.

I hope, however, that further speed improvements can be made, as it's still noticeably slower than I'd like. Perhaps a timer on each tab closure before flushing to disk, so closing a sequence of tabs quickly doesn't stall the entire browser.

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted March 18th, 2006, 2:55 am

Muescha wrote:i think its just some steps:
...

If it really is that simple, I'll happily accept code donations. Myself, I don't have the time to correctly design and implement this.

wcarloss wrote:Ever since I switched from SessionSaver to Session Manager, this forum seems to forget that I'm logged in any time that I close the browser. I haven't changed any about:config settings, I have cookies allowed for this site, and I allow JavaScript for this site. Any ideas why this might be happening and how I can fix it? I'm wondering if it isn't a profile issue since it doesn't happen with my other branch profile.

WFM. And if this behavior doesn't occur with your other profile, there's certainly something wrong there. Stuff to test: * do you save sensitive data at least for unencrypted sites (see the Advanced tab in SM's Options dialog)? * do you get any errors in the JS console (having all javascript.options.* prefs set to true)? * does disabling other extensions help?

Dan Harkless wrote:Intermittently, trying to type text in form fields would cause Firefox's find-as-you-type to get activated instead, and typing the form fields would be impossible (making the browser almost unusable). The first couple of times this happened, I was able to restore the page to proper functionality by reloading it, but on subsequent days I was unable to ever get a page to behave, once it started acting this way.

WFM. Does this also happen on a clean profile? Does disabling other extensions help (if so, which extensions did you have to disable)? Do you get any errors in the JS console (having all javascript.options.* set to true)?

EoRaptor wrote:I hope, however, that further speed improvements can be made, as it's still noticeably slower than I'd like. Perhaps a timer on each tab closure before flushing to disk, so closing a sequence of tabs quickly doesn't stall the entire browser.

The delay isn't due to writing to disk (which has been using a timer since the very beginning), but simply due to the gathering the necessary data for tab restoration. If that's still too slow and you don't need to preserve the undo history at shutdown, you might want to try the undoclosetab extension instead and disable Session Manager' tab restoring.

C@rb0n
 
Posts: 1426
Joined: February 19th, 2005, 11:22 am

Post Posted March 18th, 2006, 6:01 am

zeniko wrote:The delay isn't due to writing to disk (which has been using a timer since the very beginning), but simply due to the gathering the necessary data for tab restoration. If that's still too slow and you don't need to<b><i> preserve the undo history at shutdown</i></b>, you might want to try the undoclosetab extension instead and disable Session Manager' tab restoring.

But shouldn't the functionality you mentioned be tied to the <b>"Persistence"</b> setting? Even with this set to "Never" and the windows-related option unchecked, closing a tabs still takes a long time. It is fast only when closing "Untitled" (i.e. blank) tabs.

old zeniko
 
Posts: 0
Joined: December 31st, 1969, 5:00 pm

Post Posted March 18th, 2006, 6:15 am

C@rb0n wrote:But shouldn't the functionality you mentioned be tied to the <b>"Persistence"</b> setting? Even with this set to "Never" and the windows-related option unchecked, closing a tabs still takes a long time. It is fast only when closing "Untitled" (i.e. blank) tabs.

No. In order to be able to reopen a closed tab, I need the relevant information anyway (persisting that information is quite efficient). My point was that if you don't need persistence, you could try a completely different method.

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 2 guests