foo_spider_monkey_panel icon indicating copy to clipboard operation
foo_spider_monkey_panel copied to clipboard

Enhance warning popups about script being unresponsive

Open regorxxx opened this issue 2 years ago • 6 comments

From time to time I keep getting reports by users about this topic, which is a SMP thing and not script related at all. Thing is there is not an "user accessible" place where people is informed about it. This is a list of suggestions which should improve the current user experience (while making developer's life easier):

  • Set the default configuration to higher values (+10 secs for ex.) to lower the frequency people get it for no reason under heavy processing tasks. In case there is an inf. loop, it makes no difference at all since it will be thrown anyway (just later). Warning
  • Add a clearer description on the popup:
    • Reword it so the user understands the popup is not an script error but an SMP feature: "A script may be busy (don't report this as an error) or may have stopped responding."
    • Reword it so the user understands letting it continue is fine in many cases: "This may be common for processor intensive tasks which require more time to finish (and should be let to continue)."
    • Reword it so the user understands that stopping it will make the panel crash (and that's not an script error): "You can stop the script now (thus crashing the panel) or let it continue (usually recommended)".
    • Reword checkbox to: "Don't ask me again until next session".
    • Inform the user about the possibility to configure the timer (so they know what to do the first time they see it): "NOTE: Warning threshold can be changed at Preferences/Advanced/Tools/Spider Monkey Panel"
  • Add the info to the FAQ to point users to it: https://theqwertiest.github.io/foo_spider_monkey_panel/docs/faq

regorxxx avatar May 16 '22 19:05 regorxxx

Hi @regorxxx,

if you want to use a workaround ( which I've been using for my auto-detect resolution script since I published the theme on Github ), you can set it in the foobar preferences > Advanced > Spider Monkey Panel > Script execution time limit before triggering a slow script warning (in seconds): 30

It will be saved in your profile\configuration folder in the cfg file foo_spider_monkey_panel.dll.cfg If you made any other personal changes for SMP, I would start with a fresh one ( delete your existing foo_spider_monkey_panel.dll.cfg in the configuration folder ) and just modify the default value for the slow script time out and close foobar. The new modified foo_spider_monkey_panel.dll.cfg will be automatically written in the configuration folder. You can then upload and include it in your scripts ( see here ), so you don't have to worry about user reports...

-TT

TT-ReBORN avatar May 16 '22 20:05 TT-ReBORN

@TT-ReBORN Thanks for the suggestion :)

Although not sure about it. That requires an external file overriding the one on the user's profile, which makes more sense when you are already overriding the entire profile folder (like a theme does) but not so much for scripts: note future updates would override the user's config again (counterintuitive). That may be fine for a theme, since that's the idea.

If that's the last resort, I could simply throw a popup the first time the script is loaded warning about it and pointing users to configure it.

But anyway both approaches are simply workarounds, there is room for improvement here to make it more in line with real life scripts. I mean, right now the popup is giving more problems than avoiding them, since scripts released on the forum usually are tested enough and coded to not have infinity loops. It seems more useful for developers (while testing) than for regular users,

And that's one of the reasons to suggest changing the default timer to a much higher value, so it works in any case if there is such a bug on public scripts and developers can still set it to a lower value knowing what they do.

regorxxx avatar May 17 '22 22:05 regorxxx

@regorxxx,

well the foo_spider_monkey_panel.dll.cfg file just stores the values of the SMP settings in Preferences > Advanced. Nobody ( 99,99% ) really cares about these settings and they stay default all the time anyways... So I don't see any problem in just changing the slow script timeout value, doesn't matter when you release future updates, because it won't change anything besides the slow script timeout value... Of course it's different when using foo_ui_columns.dll.cfg or core.cfg, these two config files will change and use the saved/stored foobar preference settings, which I would only use, like you pointed out for themes...

Anyways it's still better than having an annoying popup warning and a crash.

Of course it would be the best if @TheQwertiest changes the default value ( nobody really cares / only devs for debugging ), just one click instead using these workarounds...

-TT

TT-ReBORN avatar May 18 '22 15:05 TT-ReBORN

@TT-ReBORN You got me with that point. Also since @TheQwertiest will suspend development for some time, it may be wise to apply that workaround for now.

regorxxx avatar May 18 '22 16:05 regorxxx

@TheQwertiest,

Well, some user got into trouble although it was already modified to 30 sec, see here: https://github.com/TT-ReBORN/Georgia-ReBORN/discussions/38#discussioncomment-2839899

Maximum value you can set is 60 seconds, this will still not solve the problem though, only extend...

Suggestion: Put the option for debugging only and if the script execution takes a long time, display the Windows hourglass icon so people know that the script is still working.

-TT

TT-ReBORN avatar May 30 '22 13:05 TT-ReBORN

I've been getting quite a lot of unresponsive script pop-ups like this unresponsive script popup

Please can you increase the timeout or add a way to fully deactivate it.

Thanks to regorxxx's post, I've changed the warning threshold at Preferences/Advanced/Tools/Spider Monkey Panel to 10 seconds, and hopefully that will reduce the amount of pop-ups, but I don't think most people will know about that.

FarmLox avatar Feb 19 '23 21:02 FarmLox