Closed bob2517 closed 2 years ago
Well, I've removed them. All the tests work. I had an afterTriggerReal event in 2 tests which I removed and put the test itself right after the trigger-real instead. But everything works, amazingly.
General UI seems to be a lot faster now. Every time an action command was being run, it was checking through for an after event and running a whole bunch of JavaScript, which would have been slowing things up. It would have been affecting every action command.
Startup performance would be improved too. All draw events with action commands won't be trying to run this second "after" event. So that could be a big save.
Dunno why I didn't think of removing these events before. Everything seems a lot snappier now. Not that it was sluggish before, so it's a little bit hard to tell if it's just me or not.
It just goes to show - evolution in web development can also be the removal of unnecessary things...
I'll slap it on the branch once I've wrapped up some other stuff that I'm in the middle of.
Now on the latest 2.10.0 branch.
Deleted and moved to the general discussion.
Note: this is not the same as "background-color: green after 1s;". I'm talking about removing the after events, which you have probably never used.
Important clarification. Thank you!
Back in the good old days, before ACSS had sequential commands, in order to get something happening after a specific action command, like a CSS "background-color: green;" you would code something like an "afterBackgroundColor" event which gets triggered after any ACSS command is called. I know. It was weird at the time.
Since ACSS now has sequential commands, and after 2 years of use and finding that I only use the afterAjax (and after ajax error) events, I've realised that we don't need these events any more.
So I'm going to remove them completely for 2.10.0.
The only "after" events that will remain are the afterAjax type of events, because they are the only ones that make any sense. Even with the await option on the ajax command, we still need events like "afterAjaxError" to handle runtime errors. Those will not be removed.
This should lead to a big performance improvement, which I'm about to find out as I haven't removed it yet. It's all just too exciting!
If anyone has any objections to me removing these, let me know in this issue. If there is a valid use case for keeping them which can't be gotten around just by putting your commands in sequence, I'll leave the after events in.
Note: this is not the same as "background-color: green after 1s;". I'm talking about removing the after events, which you have probably never used.