Session Manager [v7.00]  —  Bookmark your environments: locations and/or display (tabsets and layout)

Discuss and share scripts and script files...
klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Session Manager [v6.50]

Post by klownboy »

I'm using the latest V6.50 of SM and v12.90.0300 of XY. I didn't bother with the last 2 betas since they were for a specific problem and associated trouble shooting.

For the heck of it, try under "Options" of "Menu: Display List of sessions on top" to see if your top Session runs instead of "Reset" when you run your button command.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

autocart
Posts: 1243
Joined: 26 Sep 2013 15:22

Re: Session Manager [v6.50]

Post by autocart »

Thanks for thinking about it, but no, it does not help. Also when the list of sessions is on top in the menu, the ctb-hotkey resets the current session.

However, I figured it out that it has to do with the build-in mouse-modifiers of Session Manager. Strange thing only is, that even if I set the modifier Alt or Ctrl to None even then the status bar just says "Session Manager". It does not reset the session nor do anything else but the menu is also not opened.

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Session Manager [v6.50]

Post by klownboy »

Personally I've stayed away from using the modifiers, but not for any particular reason. So I just went in and set them all to none.

By the way, I've noticed that my Session Manager seems to run (i.e., display) recognizably faster if I run it from somewhere other than a CTB (e.g., a User defined command). For me anyway, there seems to be a bit of hesitation flicker running from my CTB. Flux is there something in the code (e.g., some checks that are not run elsewhere like checking modifiers or something else) that may take a bit longer to execute when running from a CTB?
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

mazot
Posts: 42
Joined: 20 Apr 2020 23:19

Re: Session Manager [v6.50]

Post by mazot »

Although i am new to XYp, I have been using for some time.
I have found that CTB's are convenient and fairly easy to use, (my own personal findings),the catalog is more
useful, to be more consistent in behavior (relatively speaking), to use. My personal experience is that if you need
a program or script on the toolbar, the easy way is to have a script to change the toolbar.
The drawback is it does seems to take that little bit of extra time. Even with a script to change toolbars.
That is why I prefer to use and change catalogs. There does seem to be a quirk with the catalog.
Some things may not work as thought BUT I have found that there is, normally, a way round.

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v6.50]

Post by FluxTorpedoe »

Hi everyone,

Just a quick word to say that I won’t be able to answer before the start or middle of next week…
:!: Nevertheless, I’ll definitely address each and every question, wish, bug report, etc. as soon as I can!

In the meantime, thanks a lot for your involvement!

Have a nice and healthy day, 8) :masked:

    Flux

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v6.50]

Post by FluxTorpedoe »

Hi’ everyone,

So, I’ll try to tackle things one after the other.
But let’s start with :bug: and issues

———————————————————————————

 ☛ CTB Icon bug

Session Manager v6.51

I won’t post the whole script (will do when the problem is solved).Here’s the only change.
Replace:

Code: Select all

"_ChangeIcons"

	global $GEN_Ini, $GEN_CurScript, $PRE_l_AvailSess;
With:

Code: Select all

"_ChangeIcons"

	global $GEN_Ini, $GEN_CurScript, $GEN_AutoSave_Suffix, $PRE_CurSess, $PRE_l_AvailSess;
This will solve the issues of the ctb icon not correctly updated.

———————————————————————————

 ☛ CTB resetting session
autocart wrote: 13 May 2020 14:10Trying to invoke the button menu with the scripting command button "ctb4", 1; [...] does not work.
I can’t reproduce…
As Ken mentioned, it could have been caused by an incorrect entry in the CTB… Or it sounds like you have the Alt key depressed while clicking (which is the default for reset).
So could you try (again) those and report what happens:
 — Reset your mouse modifiers to default
 — Create a new CTB using the snippet from the first page of this thread

———————————————————————————

 ☛ CTB slower than external
klownboy wrote: 13 May 2020 21:05Session Manager seems to run (i.e., display) recognizably faster if I run it from somewhere other than a CTB
I even tried on an old computer (with HDD and Windows antivirus running), but I can’t reproduce either…
Indeed there’s a check to see if the CTB has been changed/broken: a comparison is made between its index and the permanent variable $SM_CTBINDEX and to see if it’s really Session Manager button. But it doesn’t go further if they match. And this occurs whether you run the script from a CTB or not…
I’ll investigate.

———————————————————————————

 ☛ CTB quirks and glitches
mazot wrote: 13 May 2020 23:13 I have found that CTB's are convenient and fairly easy to use, (my own personal findings),the catalog is more
useful, to be more consistent in behavior (relatively speaking), to use.[...]
First, welcome and thanks for your feedback!
Regarding glitches, the only one I encounter from time to time is the slight offset of a CTB when the toolbar has been updated (and XY window moved, not sure exactly). It seems XY toolbar is not always refreshed properly.
Regarding the speed, I just tried to compare launching SM via CTB, Catalog, and AddressBar.
Here, the mouse cursor very quickly flashes with an hourglass before the menu is opened… But I just discovered that sometimes it doesn’t happen with the Catalog, indeed! The menu doesn’t seem to open faster (here), but it gives the impression that it fades in more than pops up after a small delay.
Then again, I use XYplorer from an SSD with no antivirus running, so I’ll investigate too!

———————————————————————————

 ☛ Feature request and wishes

I duly noted the ideas of a generic autosave, etc. And other ideas are welcome!
But I’ll focus on fixing the issues first and I’ll come back to enhancements later.

———————————————————————————

Have a nice day,   8)

   Flux

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v6.50]

Post by FluxTorpedoe »

Flash update:

I found a way to remove the kinda-flickering (when the mouse briefly changed to hourglass). And alongside managed to gain about 30 msec in the process !
Here, I have the menu opening in about 175 msec (I have 24 sessions including 10 with icons).

 ☛ The main culprit in this case was folderreport. Hourglass was gone when I replaced it with listfolder.

 ☛ If you want to debug and test your speed in various situations, just uncomment the 4 lines that include $Clock_1.
This will display in the satusbar the time taken by the script to build up and display the menu.

Code: Select all

	global $Clock_1; // Timer initialize (to help speed optimization)
	$Clock_1 = now("ssfff");
	...
	...
	...
	global $Clock_1; // Timer Check
	status eval(now("ssfff") - $Clock_1), "FF0000";

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Session Manager [v6.50]

Post by klownboy »

Hi Flux. When I run SM from the toolbar (just a clean load "<xyscripts>\SessionManager.xys";, I'm getting about 101 and 103 (i7-9700K with 32G less than a year old), and when run from a User Defined Command 94-97. I only have 7 sessions at the moment.

No, not much of a difference, but when run SM from the toolbar there's a very noticeable flicker when it displays. It's almost like it's trying twice. I'm not sure why that's happening. No flicker at all noticed when run from a user defined command.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v6.50]

Post by FluxTorpedoe »

Interesting… (And I certainly don’t get those numbers!)
But still, I see no noticeable difference in speed here between CTB and UDC. :maf:

Please tell me if the flickering disappears when you replace this (4 occurrences):

Code: Select all

folderreport("dirsrel", "r", <xydata>."\Panes", , , "|")
with:

Code: Select all

listfolder(<xydata>."\Panes", , "6")

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Session Manager [v6.50]

Post by klownboy »

Hi again Flux. It's much better with listfolder. I don't really see a flicker, possibly a slight hesitation in the toolbar runs when compared to the User Defined Command. But both methods are consistently in the 90's now with UDC average about 92ms and toolbar button about 95. Thanks. :tup:
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v6.50]

Post by FluxTorpedoe »

Cool!

FYI, the time to build a session entry (checking validity, etc.) is roughly about 4 ms here. So 20 sessions ⇒ ~80 ms more than the bare menu on my system.

@all
Performance note: one bottleneck may be using icons from exe with an antivirus active (at least each first time Session Manager is launched after opening XYplorer). It will always be faster using icon files (*.ico) or XYplorer internal icons.

———————————————————————————

Now, to tackle the wishes:
autocart wrote: 12 May 2020 13:57 3) If I am allowed to wish for a new feature: Would it be hard to implement an option to always autosave the current session? I.e. an option that the command "set autosave to current session" is automatically executed on each session change.
4) Also nice (maybe instead of 3, if this was easier to implement) would be an indicator, if the current session is in a saved or unsaved state.
4) I’m afraid this would be a little overkill, since e.g. going from List to Details or just changing panes (for layout sessions) qualifies as a different state.
3) I made a quick try and this can be achieved quite easily. I can add an Options entry to auto update all sessions on session change (which would automatically and toggle OFF and gray out the Autosave feature for a single session).
Note that there would be a performance penalty with this setting ON obviously, because the active session would always be saved before loading a new one (it’s not huge but still noticeable).
Plus, if you’ve "broken" your current session (closed interesting tabs, etc.), you’d have to think to manually reset it before loading another session.

Yet, it can make sense. Is it what you had in mind?

autocart
Posts: 1243
Joined: 26 Sep 2013 15:22

Re: Session Manager [v6.50]

Post by autocart »

Hi Flux,
4) Ok, didn't think of that. It's understandable though and makes sense. It also is not really important.
3) Yes, that's exactly what I had in mind. Thank you already.
Regards, ac

klownboy
Posts: 4089
Joined: 28 Feb 2012 19:27

Re: Session Manager [v6.50]

Post by klownboy »

Just a little side information concerning running from a UDC vs CTB. UDC is typically set to fire (by default) on key down unless you tick "On KeyUp". Whereas the CTB is by default on mouse button up unless you tick "Fire click on mouse down". That in itself sometimes presents an appearance visually of a speed difference between the 2 methods. If they're both made to fire on key or mouse down, they both feel visually to be a similar speed and in actuality they are.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Malarki
Posts: 109
Joined: 03 Dec 2019 02:51

Re: Session Manager [v6.50]

Post by Malarki »

Need to toss in a big thanks here for Session Manager. My current project has me using it several times a day to set up an string of tabs in both list panes, and it's saved me much dogwork. Great to have.

FluxTorpedoe
Posts: 855
Joined: 05 Oct 2011 13:15

Re: Session Manager [v6.50]

Post by FluxTorpedoe »

@Malarki
Thanks for the kind words! A perfect summary of Session Manager… :kidding:

@Ken
That makes sense! You’ll tell me if it’s as much noticeable with the new version.

@all
Ok, the new version v6.60 is about to be released, with several performance improvements, a few fixes, and the optional "Auto Update All" feature. I’ve already updated the changelog.
Don’t hesitate to chime in if you think something’s missing.

Post Reply