Summary: | The Scriptforge.FileSystem method ExtensionFolder() takes a long time to run on Windows | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | jcsanz |
Component: | BASIC | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | RESOLVED NOTOURBUG | ||
Severity: | normal | CC: | jp |
Priority: | medium | ||
Version: | 24.2.0.3 release | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 159638 | ||
Attachments: | File with a macro to test the error |
Description
jcsanz
2024-02-01 16:00:41 UTC
Created attachment 192325 [details]
File with a macro to test the error
(In reply to jcsanz from comment #0) > The Scriptforge.L10N method ExtensionFolder() takes a long time (more then Sorry, the method is not from Scriptforge.L10N but from Scriptforge.FileSystem Usually scripts that involve ScriptForge take 1 or 2 seconds to start running the first time, due to the need to load the library. On my experience, this is faster to load on Linux than on Windows. I tested your macro on Kubuntu (it took less than 1 second to run the first time; the second time it was instantaneous). On Windows (running on a VM) it took between 1 and 2 seconds in the first run; the second time was instantaneous. Do you have this issue only with the ExtensionFolder? Did you try with other methods? @JPL, any thoughts here? Another specificity of the first execution is that the list of extensions is preloaded. The loading of the list is done with GetDefaultContext.getByName("/singletons/com.sun.star.deployment.PackageInformationProvider").ExtensionList returning an array of arrays. Maybe a test on Windows of the duration of above line of code could contribute to find the root cause of the observed behaviour ? On my side I cannot reproduce the issue either. (In reply to Rafael Lima from comment #3) > Usually scripts that involve ScriptForge take 1 or 2 seconds to start > running the first time, due to the need to load the library. As you see the load of library is done before the time messure > On my > experience, this is faster to load on Linux than on Windows. In this case it is true > I tested your macro on Kubuntu (it took less than 1 second to run the first > time; the second time it was instantaneous). On Windows (running on a VM) it > took between 1 and 2 seconds in the first run; the second time was > instantaneous. Yes as I said, my test in Linux was correct > > Do you have this issue only with the ExtensionFolder? Did you try with other > methods? Yes, I had the prblem only with this method, and yes I've tested other methods mostly in the Scriptforge.L10N service (In reply to Jean-Pierre Ledure from comment #4) > GetDefaultContext.getByName("/singletons/com.sun.star.deployment. This statement takes a little more time in execute than others, but takes aceptable times. --- Further tests in a different Windows machines result in normal execution times, so probably the problem was (is) my Windows machine. So I think this bub can be closed with NOTOURBUG Thanks to all for efforts done. (In reply to Jean-Pierre Ledure from comment #7) > Thanks to all for efforts done. Thanks to you all for Scriptforge and for your kind help |