Closed solares closed 1 year ago
There are several different ways of approaching this, some of which would be relatively trivial.
The plugin fetch occurs in: platform/resources/shell.lua. The "once a day" thing you're referring to occurs here:
Forcing a plugin version won't have any impact on this as plugins of particular versions can receive bug fixes, etc. However, adding a general property to build.settings to "not check for plugin updates" would be relatively trivial to implement. Adding plugin specific properties to control the updates for each individual plugin probably wouldn't be much of a stretch either.
I think we could take one extra step here as well and consider adding some minor UI to inform the user that the plugin is in fact fetching plugin updates. I'm a fairly experienced user and I only realised the lag spikes on launch were caused by plugins being fetched like 2 years ago.
I could take a look at this issue around Thursday or Friday next week.
Thanks @XeduR
Maybe we can add one more option to each plugin definition (See https://github.com/coronalabs/corona/issues/426)
["CoronaProvider.native.popup.quickLook"] = {
publisherId = "com.coronalabs",
version = "^1.2.5",
autoUpdate = false
}
I suppose autoUpdate=true
should be the default, so no change of behaviour for current users.
Or we could have a global setting in build.settings, autoUpdatePlugins=false
to set the default for all plugins.
I think I’ll just make maxAge customizable. This would be easy fix for the issue. Syntax for disabling auto-update for me seem quite ambiguous. May be it would be easier to deal with the issue with a setting?
Making the maxAge customisable was my idea as well for the general approach as well. I figured it'd be quick to assign values like:
1) not defined in build.settings or value is not a number -> default to 24h 2) value is set to less than or equal to 0 -> disable the fetching entirely 3) any value above 0 -> overwrite the default 24h value
This should be fixed by #480. To customize the timer, run a command:
defaults write com.coronalabs.Corona_Simulator SimPluginCacheMaxAge -int 0
0 or less - disables timer. To restore - delete the preference:
defaults delete com.coronalabs.Corona_Simulator SimPluginCacheMaxAge
On windows:
reg ADD "HKEY_CURRENT_USER\Software\Ansca Corona\Corona Simulator\Preferences" /f /v SimPluginCacheMaxAge /d 5
rem And to delete:
reg DELETE "HKEY_CURRENT_USER\Software\Ansca Corona\Corona Simulator\Preferences" /f /v SimPluginCacheMaxAge
Thanks @Shchvova and @XeduR. Much obliged.
Describe the bug About once a day, when Solar2D starts up it takes about 10 seconds to check all plugins. Can we stop this default behaviour, and only check plugins when we ask it to?
If we use this https://github.com/coronalabs/corona/pull/427 then will it prevent this happening, or will it still check?
Target platform and where build was made:
To Reproduce Start up Solar2D simulator. See log something like below