Re: Creation of many components & time
- From: monkeyiq dingoblue net au
- To: Michael Meeks <michael ximian com>
- Cc: gnome-components-list gnome org
- Subject: Re: Creation of many components & time
- Date: Wed, 24 Jan 2001 21:46:33 +1000
Michael Meeks wrote:
> Hi there,
>
> On Wed, 24 Jan 2001 monkeyiq dingoblue net au wrote:
> > Has anyone benchmarked how many simple components can be created
> > with bonobo / sec ? Like how many echo components can be generated /
> > sec on a modern machine.
>
> Nope; however the code path shouldn't be all that long.
I would suspect that the gtk+ new object stuff may be lagging the code here.
I will prolly benchmark raw gtk+ object creation vs bonobo component creation
to check this out. At any rate it seems that there are *many* orders of
magnitude
in speed diff between creating a C++ object and creating a bonobo component.
I haven't benchmarked ActiveX on a machine like this one, so I can not draw
cross performance figures ... but I think that such data would be interesting
as it
seems that one can not have 1000 components in any light to medium weight
bonobo
app at the moment.
> If you use
> a shlib component ( see eg. monikers/bonobo-moniker-std.c ) then all the
> invocations will be in proc.
I based the following on the echo sample, I started the bonobo-echo before
echo-client was invoked.
[ben kloof bonobo-class]$ time ./echo-client
i is at 0
i is at 100
i is at 200
i is at 300
i is at 400
i is at 500
i is at 600
i is at 700
i is at 800
i is at 900
real 0m6.227s
user 0m1.360s
sys 0m0.260s
Running on a P3 770 Mhz.
This was creating 1000 echo components with code like:
void
benchmark( int number_to_make )
{
BonoboObjectClient *server;
Demo_Echo echo_server;
CORBA_Environment ev;
char *obj_id;
int i = 0;
obj_id = "OAFIID:Bonobo_Sample_Echo";
for( i = 0; i < number_to_make; i++ )
{
server = bonobo_object_activate (obj_id, 0);
if (!server) {
printf ("Could not create an instance of the %s component", obj_id);
return 1;
}
echo_server = bonobo_object_corba_objref (BONOBO_OBJECT (server));
if(!(i%100)) {
printf("i is at %d\n",i);
}
}
}
>
>
> So the overhead is ~0 after factory activation.
>
Well, I would assume that it would be slower because of stubs, and surely the
CORBA_alloc() - free() stuff when passing args... not that any of this CORBA
stuff can be helped :-)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]