Worker example – what am I doing wrong?

Hello!

I just downloadad Xojo 2020.2 and tried out the word count example of the Worker class (with the .txt files in the example folder). I tried different combinations of Core Percent and Maximum Core Count, but the resulting time is always the same no matter how many cores I am using (on my early 2015 13" MBP Retina).
What do I miss here?

I believe a 2015 13" MBP is only dual-core. If so, you don’t have more than 1 extra core to work with, really.

Ah, maybe I didn’t understand how the Worker class actually works. I think I‘ll have to take a closer look…
Thank you!

Be sure to also check out the blog post:

In debug run it will be running in a thread.
Make abuild to show the actual values

Edit: I’ll make a new thread for my question

I just saw that I need a Desktop license in order to build the app. Unfortunately I just have a Lite license for Windows and Mac, so I think I‘m out of the game here. :confused:

Same here.

Well, to make the answer clear, Workers DON´T work on debug mode.

You have to purchase a license and actually build the app even if is just to test the feature :roll_eyes:

They could set a switch on if it runs in a thread or as a console app when run from the ID. As thread for debugging as console app for speed testing…

That way a license would still be needed for deployment but it could be both debugged and REALLY tested in the IDE, although not at the same time.

-Karen

1 Like

Addendum:
Since I had planned to renew my license during Black Friday sales anyway, I just upgraded to the Desktop version. I toyed around a bit with the new Worker class in a new project (while cross reading the example code), but I cannot get my head around it. While everything seems okay in Debug Mode, I get piles of Errors when trying to build the app (items don’t exist, have no member xy, etc.).
I wish the Help documentation would be a little more … hm … verbose. :relieved:

1 Like

Similar issue here: have Lite, so cannot test performance of Workers. I created my own solution for multicore by launching console processes and created a mechanism for the main app to talk to these helpers, but Workers seems like a simpler way, hopefully.

Moreover, Jens’s report of multiple failures when trying to build to actually test the performance boost (including startup: my one worry is the time it takes to launch N console apps when a Worker runs, which may nullify any performance gains for shorter tasks. I now launch N helpers every time my app starts up so they’re ready, not sure if this can be done with Workers), is not reassuring.

Alyssa does point out that there is a 90 day money back so if we upgrade our license and this new class disappoints, you can bail.

P.