On 2020-04-11 13:54, Neville Smythe via use-livecode wrote:
Sorry Brian, I uploaded from the wrong folder. Here is the update test
set. But the only difference is that you don’t need to hold down the
shift key to see the binary save timing.
https://www.dropbox.com/sh/cb2r9jbohxqv6bp/AAAQ1weLLlzrKYQ21yn1apf9a?dl=0
<https://www.dropbox.com/sh/cb2r9jbohxqv6bp/AAAQ1weLLlzrKYQ21yn1apf9a?dl=0>
Colin, the test set here shows the timing of saving of stacks; the
times for Windows 10 are a large multiple of Mac/Unix and we
discussing possible reasons before updating the bug report bug 21305
<https://quality.livecode.com/show_bug.cgi?id=21305> for Quality
Control
So I also had a look at this today - using Visual Studio's builtin CPU
profiling diagnostic when running the engine in release mode.
There appear to be two reasons for the difference:
1) When saving each style run (block) in a field the engine is making
three Win32 API calls.
2) The saving method uses (and always has used) direct Win32 system
calls to manipulate files without any buffering (on other platforms we
wrap the standard C library stdio FILE which has its own buffer).
I tested your very neat little stack with 1323 cards (about 36Mb of
data).
On my machine with the engine as it is it takes:
- Windows 10 (VM) [ Community 'develop' ] - 10s
- macOS Catalina (Native) [ Business 9.5.0 ] - 0.45s
After doing a hacky patch to the sites using the Win32 API calls (i.e.
caching the results and only calling them once) I got:
- Windows 10 (VM) [ Community 'develop' ] - 1.8s
After adding a very simple write buffer to the Win32 implementation of
the system file stream class we have. I got:
- Windows 10 (VM) [ Community 'develop' ] - 0.4s
Anyway, the patches I've made are quite rough at the moment, but I'll
endeavour to submit them as PRs in the next few days :)
Warmest Regards,
Mark.
--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode