# XDC 2020 Keynote Discussion

**URL:** <https://ifnotnil.com/t/xdc-2020-keynote-discussion/231>\
**Category:** Other\
**Created:** [25 March 2020 22:49 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231 "2020-03-25T22:49:51Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [26 March 2020 00:01 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/21 "2020-03-26T00:01:14Z")

</div>

> [@Karen](#):
>
> If I understand things (and I may not), using an IPCSocket to transfer data is a lot more overhead than just a memory copy…

It certainly could be  
Copy from Xojo to the network interface (even if its a loopback)  
Then when it reaches the “other end” do the reverse  
Its not “free”

Shared memory is as close to free as you get - Peter Stys uses this in his app and its blazing fast because there is no copying  
You put the data into the app and then it can be read by others directly  
Its not trivial to set up but MBS does have a plugin that makes shared memory relatively easy to work with  
You still cant move “objects” across it but you can move a LOT of data

> [@Karen](#):
>
> BTW I was planning on trying to create a generic data transfer method (I like doing things once! 😉 )between master and helpers using shared memory, not using plugins , for Mac and Windows (the platforms I care about) …
> 
> I had looked up a bunch of stuff on the declares for both platforms a few months ago before I got sidetracked on non coding stuff outside of work …
> 
> Not sure how hard it was going to be … but at first blush is looked like it might be doable, though FAR from easy.
> 
> But as it is not an immediate need for me, maybe I should just wait and see what they come out with, as trying to write that would require pushing my knowledge limits a good bit and take a lot of time.

and even the you cant transfer OBJECTS - not the references at least  
you can move the data they hold across (using whatever formats you want) and recreate the objects on either side to keep them in sync

and for a LOT of stuff that will be adequate

Workers will be interesting to try out and see JUST how they work and what the limits are

Its probably the ONLY thing in the entire keynote I am looking forward to

---

<div class="post-metadata">

**Author:** ![Karen](https://ifnotnil.com/letter_avatar_proxy/v4/letter/k/7feea3/32.png) [@Karen](https://ifnotnil.com/u/Karen)\
**Post date:** [26 March 2020 00:11 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/22 "2020-03-26T00:11:06Z")

</div>

> [@npalardy](#):
>
> and even the you cant transfer OBJECTS - not the references at least  
> you can move the data they hold across (using whatever formats you want) and recreate the objects on either side to keep them in sync

You may remember I was working on a mechanism for serializing binary data from a DB cursor (though also an object or array of objects ) in a memoryBlock… and the address space of the memoryblock could be in shared memory… with a header describing the data… think of it as binary recordset in memory.

Anyway that was what i was planning to try to do long term.

- karen

---

<div class="post-metadata">

**Author:** ![Garry](https://ifnotnil.com/user_avatar/ifnotnil.com/garry/32/2_2.png) [@Garry](https://ifnotnil.com/u/Garry)\
**Post date:** [26 March 2020 00:11 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/23 "2020-03-26T00:11:42Z")

</div>

> [@npalardy](#):
>
> Its probably the ONLY thin in the entire keynote I am looking forward to

And you probably won’t get it in R1. Rotten luck.

---

<div class="post-metadata">

**Author:** ![samRowlands](https://ifnotnil.com/user_avatar/ifnotnil.com/samrowlands/32/121_2.png) [@samRowlands](https://ifnotnil.com/u/samRowlands)\
**Post date:** [26 March 2020 00:52 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/24 "2020-03-26T00:52:02Z")

</div>

> [@Karen](#):
>
> But with it being sent through an IPC socket the data is essentially being copied… Unnecessary CPU and memory use that can matter in some situations.

That was my concern also. Processing a 100 megapixel 128-Bit image, will suck with IPC. Thankfully I’m pretty certain if these are just console apps, we **should** be able to use shared memory, maybe even IOSurfaces (GPU based).

> [@MarkusWinter](#):
>
> Workers:  
> Using 12 cores and just a 4fold increase?  
> Could use some optimization.

There two bottlenecks that I see.

1. He’s doing disk IO, which is not asynchronous (AFAIK).
2. Scheduling; if each “job” completes quickly and the console app dies, there’s wasting time in setting up another one to do the next “job”. Even if the console apps are persistent, there’s still wasted time in simply managing the jobs. I suspect if each “job” (wasn’t disk based) did two or three tasks in a loop, there’d be less scheduling and improved performance.

It took me a while to get GCD to show a 7 fold improvement on a 4 core machine, simply because my initial tests were spending too much time scheduling, once I started to give each task more to do between scheduling, I started to see more improvement.

---

<div class="post-metadata">

**Author:** ![samRowlands](https://ifnotnil.com/user_avatar/ifnotnil.com/samrowlands/32/121_2.png) [@samRowlands](https://ifnotnil.com/u/samRowlands)\
**Post date:** [26 March 2020 00:53 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/25 "2020-03-26T00:53:34Z")

</div>

> [@Karen](#):
>
> You may remember I was working on a mechanism for serializing binary data from a DB cursor (though also an object or array of objects ) in a memoryBlock… and the address space of the memoryblock could be in shared memory… with a header describing the data… think of it as binary recordset in memory.
> 
> Anyway that was what i was planning to try to do long term.

That’s pretty clever, did you get it finished, did it work?

---

<div class="post-metadata">

**Author:** ![samRowlands](https://ifnotnil.com/user_avatar/ifnotnil.com/samrowlands/32/121_2.png) [@samRowlands](https://ifnotnil.com/u/samRowlands)\
**Post date:** [26 March 2020 00:58 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/26 "2020-03-26T00:58:16Z")

</div>

> [@Karen](#):
>
> I had looked up a bunch of stuff on the declares for both platforms a few months ago before I got sidetracked on non coding stuff outside of work …

Which declares are you using for the macOS, there’s two that I know of and one is not usable with a Sandboxed application (and maybe not with a Hardened application).

There’s another possibility I’ve been considering, which is a memory backed DMG. You’d have the overhead of using file IO API, but it **should** be quick, and relatively painless. For Sandboxed apps, you should be able to share a document based Security-Scoped Bodgemark. I noticed there’s even an option to make the DMG invisible to the Finder, so the user wouldn’t see it.

---

<div class="post-metadata">

**Author:** ![Karen](https://ifnotnil.com/letter_avatar_proxy/v4/letter/k/7feea3/32.png) [@Karen](https://ifnotnil.com/u/Karen)\
**Post date:** [26 March 2020 03:08 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/27 "2020-03-26T03:08:53Z")

</div>

SAM,

My original idea was to use the binary serialization to send data to clients for in house client server apps using a modified Aloe Express server, to minimize memory use and processing on the server, and send it to the client in a form that it could be put into a memoryblock in a form that could be read without the overhead of JSON serialization and deserialization…

The memoryblock could optionally be Gzipped or the memoryblock could be built with blocks of Gzipped records for applications were RAM was tight on either the client or server…

I got that done for RecordSets or through code (adding fields and records through custom code)… Longer term was to use introspection to do it for the public properties for arbitrary class instances or arrays of instances … I did some work on that but had not finished it.

Then I started thinking about server processing using helpers and realized that would be the perfect mechanism for transferring data between server and helpers using shared memory to minimize memory use and processing…

So i did some research on how that could possibly be done without plugins… While i have the Einhugur plugins as there were a number of things I needed and renewals are not too expensive, I could not justify cost of MBS.

Also if it came out really well I might, want to release my classes and for that i woudl not want plugin dependancies…

But with Workers on the horizon, that project probably does not make sense anymore.

I was not worried about Sandboxed or hardened Apps as fo in-house stuff at work, that does not matter. As for which MacOS API’s found, I would have to look at the search results I saved back then.

I am not an OS declare guru for any platform, that part would have been the hardest for me.

Before today, this is one of the things I WAS considering working on if i was going to be home for the virus for a month or so.

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [26 March 2020 04:51 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/28 "2020-03-26T04:51:19Z")

</div>

Sure  
I’m currently doing that to / from a XojoScirpt context so xojo script can manipulate databases using much the same syntax as you would in a normal db (including database, recordset, etc etc etc)

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [26 March 2020 04:51 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/29 "2020-03-26T04:51:44Z")

</div>

From what Kem said that might be true

---

<div class="post-metadata">

**Author:** ![pidog](https://ifnotnil.com/user_avatar/ifnotnil.com/pidog/32/75_2.png) [@pidog](https://ifnotnil.com/u/pidog)\
**Post date:** [26 March 2020 15:19 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/30 "2020-03-26T15:19:51Z")

</div>

> [@Garry](#):
>
> design-time rendering using XojoScript in the layout editor for custom controls. What do people think he meant by this?

I’m 99% thinking this means that 3rd party controls written in Xojo can render in the IDE like native Xojo controls do (and plugins currently can).

For example, a canvas-based button could draw itself in the IDE based on the values you’ve set in the inspector.

---

<div class="post-metadata">

**Author:** ![Garry](https://ifnotnil.com/user_avatar/ifnotnil.com/garry/32/2_2.png) [@Garry](https://ifnotnil.com/u/Garry)\
**Post date:** [26 March 2020 15:28 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/31 "2020-03-26T15:28:45Z")

</div>

That would be so great. I’m currently writing a module with a bunch of classes (canvas subclasses) and it would be super helpful to render them with a preview.

Btw, welcome @pidog

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [26 March 2020 15:42 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/32 "2020-03-26T15:42:00Z")

</div>

> [@pidog](#):
>
> I’m 99% thinking this means that 3rd party controls written in Xojo can render in the IDE like native Xojo controls do (and plugins currently can).

I doubt its the same way native controls do - you’ll be drawing the control using graphics primitives.  
Native controls the IDE actually creates an instance and has the OS draw it  
Thats not this

The thing thats added here is a special context object in the IDE that has an API that exposes a graphics object you can draw into  
I’ve done that for my own projects but there is no way to make that work without the IDE’s assistance  
The IDE has to have such a context object

---

<div class="post-metadata">

**Author:** ![pidog](https://ifnotnil.com/user_avatar/ifnotnil.com/pidog/32/75_2.png) [@pidog](https://ifnotnil.com/u/pidog)\
**Post date:** [26 March 2020 16:59 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/33 "2020-03-26T16:59:53Z")

</div>

Right, I should have emphasized _like_. It allows a control to render a reasonable facsimile of itself. A control that can render itself completely via xojoscript _might_ be close to an exact rendering though.

I’m personally pretty excited to try it out.

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [26 March 2020 17:09 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/34 "2020-03-26T17:09:02Z")

</div>

it should make the in IDE experience better

I’m curious how it will affect IDE performance  
Its one reason I’m not using 3.1 - its soooooo slllooooowwwwwwww despite the claims to have sped things up  
I find it noticeably slower

---

<div class="post-metadata">

**Author:** ![pidog](https://ifnotnil.com/user_avatar/ifnotnil.com/pidog/32/75_2.png) [@pidog](https://ifnotnil.com/u/pidog)\
**Post date:** [26 March 2020 17:12 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/35 "2020-03-26T17:12:44Z")

</div>

Agree… I wouldn’t expect it to be much of a hit unless they recompile the script every time it renders though. It doesn’t seem like the ide does any significant cacheing currently, so there’s a lot of rendering going on.

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [26 March 2020 17:20 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/36 "2020-03-26T17:20:14Z")

</div>

actually the IDE does do a lot of caching of what it can cache so it doesnt ask the os to readraw controls all the time  
or let me say it used to but that seems to have slowed a LOT

but there are some controls where even small changes require a redraw  
like changing the initial value of a listbox  
you can really only ever change that before its set up and changes after its created & drawn have no effect (this is true in our own code as well)  
so to get it redrawn you have to create a whole new instance and redraw it

there are several controls that are like that where you have to recreate them to get them to redraw with whatever new properties

but, when possible, the IDE used to cache a pile  
the background layer, the window frame and all the control images it could

really this part isnt rocket science  
its quite literally what “draw into” is for  
there’s only a handful of controls that dont use that to draw themselves for the IDE

---

<div class="post-metadata">

**Author:** ![Garry](https://ifnotnil.com/user_avatar/ifnotnil.com/garry/32/2_2.png) [@Garry](https://ifnotnil.com/u/Garry)\
**Post date:** [26 March 2020 19:30 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/37 "2020-03-26T19:30:22Z")

</div>

> [@pidog](#):
>
> I’m personally pretty excited to try it out.

Me too. additionally it’s extra eye candy for third party vendors selling custom controls.

---

<div class="post-metadata">

**Author:** ![samRowlands](https://ifnotnil.com/user_avatar/ifnotnil.com/samrowlands/32/121_2.png) [@samRowlands](https://ifnotnil.com/u/samRowlands)\
**Post date:** [27 March 2020 01:35 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/38 "2020-03-27T01:35:38Z")

</div>

I welcome it; t’was only a few weeks ago I wrote a application to do just this so that I could save time when designing (and testing) custom controls or even interfaces.

The main reason I refrained from bragging about it, is because I only added support for what I needed at the time and secondly, without being able to use the Xojo code editor in it, it can make it much harder to use. i.e. no auto complete, syntax highlighting and so on.

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [27 March 2020 01:43 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/39 "2020-03-27T01:43:26Z")

</div>

ah … I thought this seemed familiar  
feedback://showreport?report\_id=3851

---

<div class="post-metadata">

**Author:** ![beatrixwillius](https://ifnotnil.com/user_avatar/ifnotnil.com/beatrixwillius/32/24_2.png) [@beatrixwillius](https://ifnotnil.com/u/beatrixwillius)\
**Post date:** [27 March 2020 02:52 UTC](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231/40 "2020-03-27T02:52:13Z")

</div>

Am I the only one who thinks that new controls with new events is like renaming events just worse? Now we have to replace all our controls - hundreds and hundreds of them - instead of just renaming the events. And the benefit is zero.

[Previous page](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231.md?page=1)

[Next page](https://ifnotnil.com/t/xdc-2020-keynote-discussion/231.md?page=3)
