TODEPOND TIMES: Performance Performance
Added 2023-04-20 20:44:24 +0000 UTCIt's another weekly edition! Of the...
πΈ TODEPOND TIMES πΈ
What's new this week?

Performance
I've been making more *stuff* for the Arroost engine. And with each thing that I add, the engine gets a bit slower. So this week... I spent a bit of time speeding it up.
I already did a bunch of 'performance boosting' early on, but now that there's more going on, some new bottlenecks have appeared!
Let's get technical! These are the things that were slowing it down. (I'll try to explain it as simply as I can for coders and non-coders alike!)
π Reading HTML
I write my code in a language called JavaScript. But sometimes I want to use a different language, called HTML (because it does different things better).
So I have a little tool that lets me write HTML inside my JavaScript. Normally, you need to use a bulky 'framework' to do this, and it all gets mashed together before you run the program. But I like to keep things simpler, and it gets done while the program is running!
It gave me a lot of freedom, but it was taking too long. So I changed the way it works. It's more ugly now, but it's quicker!
Normally, it's quick enough for my needs, but Arroost works differently to all my other projects. It means that I need to write a lot more HTML than usual!
π Signal Stores
In Arroost, everything is a 'signal'. This means that everything can 'react' to everything else. For example, you could say: "When a thing is on the top half of the screen, it's green, otherwise it's blue."
You don't need to tell it how or when to check what its position is - you just declare how it should look, based on its position.
Many of these 'signals' contain more signals inside themselves! For example, the 'position' signal of a thing contains two more: their 'x' and 'y' co-ordinates.
Unfortunately, every time you changed a position signal, the engine would check that the signal still contained two signals inside it. This is on purpose! Maybe you'd want to change the position signal, so that it contained three inside it instead - 'x', 'y', and 'z'.
But this was taking a long time! So I've decided that, in the Arroost engine, we *can't* change the shape of signals after they've been created. This speeds things up, with the downside of less flexibility!
π Reading Signals
In the web development world, there are lots of different ways of using signals. It seems like the community hasn't agreed on a single way of doing it yet (and maybe never will).
Personally, I don't know which way I prefer. So with my signals, you can use them in *any* way. (I wanted to try them all out).
Unfortunately, one of these ways... is making it slow to make new signals. I could create it differently, but it would require a full rewrite, so I've just disabled that way for now! It's made it a lot quicker.
For the nerds: It was too slow to dynamically make a function with the function constructor.
π Secrets
I was storing some secret data on my signals. I wanted to keep them as clean as possible, so I tried to hide away any information you wouldn't need to see or use.
The way that I was doing this was too slow. I could do it in a quicker way in the future, but for now I'll just keep it un-secret.
For the nerds: I was defining too many properties with the reflection API.
π Invisible Things
When you create a thing in the engine, it gets placed into the world! And your computer figures out where to place it on your screen, and in what order.
But I've started making a lot of things that are invisible. They're like little friendly ghosts that help all of the 'real things' 'do their thing'.
These 'helper things' aren't ever going to be visible on the screen, but we're still working out where to place them. This is a waste of time! So I've made sure that they don't-
Wait hang on, I haven't done that yet! But I will soon :)

Perform
This week, I've also been writing much more of the video script, and I'm ready to start putting the video together.
I've *also* been writing up my submission to do a talk at the Strange Loop conference (with some help from people on the fediverse).
I'm allowed to submit 2 talks, so I think that I'm going to do one about creative tools (including Arroost). And I'm very tempted to submit one about DreamBerd, my joke/parody language.
I find it very very hard to write submissions like this. It feels uncomfortable to write about myself in a way that's supposed to advertise me + my work. And I struggle to match the tone that these things expect.
It's so frustrating!
I can write these weekly posts fine, and my scripts. I feel comfortable-ish stringing together words to say in public. But when it comes to writing a submission, I just can't do it!
I think part of the reason is... in those places that feel ok... I've found my voice in some way. When I struggle... it's when I'm trying to put on a different voice, and be something else.
I think that I need to learn that it's not all-or-nothing. I would like to learn how to adapt 'my voice' to other contexts better. I want to be able to write a submission that matches what I'm applying for... but also - be resolutely 'me'.
ANYWAY! Thank you very much for reading this longer-than-usual update! And thank you so much for your support! I hope you have a really good week, wherever you are in the world. See you next time! πΈπ
Days since tode fell asleep: 105
Days since bot went missing: 70