Multi-core usage information for Xojo

@Norman Palardy : I looked at the example. Not sure what this is supposed to show me. I want to do text processing and database writing in parallel.

@Christian Schmitz: there is exactly the same question like for XojoScript. What can I do with JavaScript? The MT methods helped me quite a bit because they abstract the complexity.

My app handles GB of data. Either the stuff could be done in parallel where I simply let the archival run for multiple IMAP accounts or even mailboxes. Or I could do the text processing on one processor and the database writing in another. Both approaches require complex synching. I don’t see either possible with XojoScript or JavaScript.

The whole discussion may not help you much Beatrix.

You may better run 10 copies of a helper app, so each one could process 1000s of emails and put result in central database.

[quote=476826:@Beatrix Willius]@Norman Palardy : I looked at the example. Not sure what this is supposed to show me. I want to do text processing and database writing in parallel.
[/quote]
text is certainly possible to deal with in a xojoscript however, as things sit today, it wont happen in parallel because XojoScript is not distributed across cores
as of TODAY you need helpers

I made some more enhancements here for the JavascriptEngineMBS class.
We can pass memory block by reference to JavaScript, so you can work directly on the bytes in JavaScript.
e.g. for image effects.

And we can run it 8 times on 8 threads to get 800% CPU usage.

while handy still means your writing some in Xojo and some in JS
I think Sam’s point was to NOT have to do that

My point is that we need a modern solution, and there’s one built into the OS, which works incredibly well in my usage, and yes, I’d like to be able to utilize it directly from within Xojo and take advantage of a dev tool and language that I am more comfortable with.

I know you don’t think that Xojo using GCD is a good idea, and I personally don’t see much value in using a limited scope scripting language that probably isn’t going to make it any easier to do what I do (which is what I want).

Are plugins, JIT and helpers permitted on the iPad? If not, then GCD is pretty much the only choice Xojo have left going forwards. Catalyst is here now, enabling iPad apps to run on the Mac (and I’d imagine with the same limitations). I pretty much expect when ARM based MacBooks arrive, iPad apps are what it runs.

Another concern about JIT, is that it’s already on Apple’s “Security” list. With Harden Runtime, JIT is barred by default and requires entitlements to work, if Apple decide that the JIT entitlements are only temporary (which has a strong possibility as Apple do NOT communicate their intentions to use developers, if we’re lucky we get a Deprecation warning, if not, it’ll just dissappear like some other entitlements have done), JIT based apps will no longer work going forwards, and in this case JIT is being used a substitute for GCD.

Anyhow, it’s not like you or I are in a position to make either solution for Xojo, who knows, maybe Xojo already have a plan, maybe it’s already underway, maybe it’s something that neither of us can see, and will blow us out of the water.

In the mean time, I’m going to be moving my most demanding logic over to t’other tool, if I have the time, I might even see if I can utilize a block to callback in Xojo to do some primitive work using native Xojo. Which would simply my workflow as I’d only need to edit one project in one language. After using two or more languages throughout a week, I often end up mixing them up, which kills productivity as my brain doesn’t see a problem.

Into ONE of the supported OSes and you know how Xojo hates doing platform specific stuff
plus Xojo script is already really really close to being sandboxed in a way that worrying about the issues that come along with preemptive threading can be easily avoided

let me say this
I have a proof of concenpt app for a client that uses XojoScript extensively
We can draw UI’s
We can run databae queries
We can layout new UI’s
All in XojoScript
There are some limitations but I hope to see them removed
But it all works and the only thing that limits us is our imagination at this point

[quote=476870:@Sam Rowlands]Are plugins, JIT and helpers permitted on the iPad? If not, then GCD is pretty much the only choice Xojo have left going forwards. Catalyst is here now, enabling iPad apps to run on the Mac (and I’d imagine with the same limitations). I pretty much expect when ARM based MacBooks arrive, iPad apps are what it runs.
[/quote]
If you’re expecting that Xojo will “keep up” remember that they JUST moved to modern filesystem APIs and off ones that were deprecated many many years before (maybe 10 ?)
I would not expect GCD to happen “quickly”

The rest - I do not disagree with you and your assessment I just am not holding my breath about being able to make something happen quickly