Update

Blog post by axeld on Fri, 2005-11-25 18:32

You may have noticed that the posts got rare in the last weeks - it’s not that I don’t want to write updates, but while I’m working on the app_server, it’s hard to report the actual progress.

In fact, I completed the new event dispatching system today - it took longer than I thought as I had to work on several different components to make it work. For instance, our current (and soon to be thrown away) BMessage implementation was not able to deliver messages to the preferred handler, it forgot “preferred” and set “none” - the message dispatching code in BLooper/BWindow was written around this “feature”, as if it were given (messages will always get delivered to a looper, and will then be distributed to the looper’s handler objects - a BView is such a handler for a BWindow).

I also spend some time on the input_server that solved some things in too complicated and partially broken ways. For example, it has an internal queue where the input devices add their messages to - this was a standard port, so every message had to be flattened, written to the port, read from the port, and unflattened again for processing. Since the input devices run in the same team as the rest of the input_server that was a pretty large overhead - besides the fact that those messages (all of them) were never deleted and thus leaked memory with every mouse move.

It’s not that I only had to fix bugs in other people’s code - I also fixed a stupid bug in the kernel and in BFS (in the Haiku-only version), and I guess those fall into my responsibility :-)

To cut a long story short: as a side effect of working on the event handling, we now have a more stable Haiku we probably ever had before. Instead of crashing, the app_server now likes to deadlock - which is an improvement, if you ask me. It’s not surprising that it does so, as we don’t have a locking model in the app_server: everyone can be locked, and everyone locks everyone without thinking twice. That’s one of the things I will be working on next.

The other thing is to continue refactoring the code, and fix the broken Layer class hierarchy. The basic problem is that RootLayer (a subclass of Layer) does too much, and is therefore, but not only therefore known to its super class and other layer dependants - if you’re familiar with class design you will know that that’s a good indicator for a redesign. I call it refactoring.

In other news, I will continue my work for Haiku until the end of December this year - thanks for your kind and generous donations to make this possible.