Re: Using GObject library to create a lot of objects



Hi,

On Sat, 05 Mar 2005 14:38:08 -0300, Fabrício Barros Cabral
<fxcabral yahoo com br> wrote:
I'm thinking develop an application using the GObject library, but I
have a dilemma: use or not use the GObject library. This application is
object-oriented but will be able to create-use-destroy a lot of objects
(10.000 or more) during the execution of this application.

From curiosity I added some printfs to g_object_new() and
g_object_finalize() and tried running my application. It's a pretty
typical large-ish GTK application which makes quite heavy use of
gobject ... http://www.vips.ecs.soton.ac.uk/

During startup I created 40,000 objects and destroyed 10,000. After
loading a medium-sized workspace I had 45,000 objects active. My
application feels responsive and not a very heavy user of memory. The
slowest machine I regularly use it on is a 450MHz P2, and even there
it's not too bad.

As other people in this thread have said, the answer is probably to
try a few test cases. If you will find signals, inheritance, reference
counting, properties and run-time type checking useful in your
application, gobject is a good choice and not too heavy (IMO) (and
10,000 objects is not so very many).

John



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]