Posts

Showing posts with the label performance

We want MiniObject

My last blog post managed to attract the attention of some of our beloved GNOME developers, especially the ones working on/with embedded systems. That made me realize that I am not (at least completely) on crack and decided to file a nice big bug for addition of something similar to GstMiniObject to core gobject library. Lets see what happens next. :)

Think before you create GObjects

I had always been hearing that GObjects are slow and it's not always a good idea to use/write them but I never saw any evidence to support that. I had this desire to write a test application to get this evidence but felt too lazy to do it in C. I realized a few days ago that I can write such an app very easily in Vala without giving up much on my laziness. :) So here is an app that I wrote last evening after returning from vacation. Here are the results on my laptop: $ ./test-perf 0.000182 seconds taken in creating 10000 structs. 0.001598 seconds taken in creating 10000 instances (compact). 0.003522 seconds taken in creating 10000 instances. 0.090455 seconds taken in creating 10000 instances (GObject). The ranking is exactly how I expected it to be but didn't expect such a big difference between them all.