[Metakit] closing big file : slow

Jean-Claude Wippler jcw at equi4.com
Sat Sep 18 01:40:02 CEST 2004


Riccardo Cohen wrote:

> I have a big database :
> - size = 3Mo

That's small, actually.

> - tables   c4gis_param, c4gis_geo, c4gis_id
> - c4gis_geo has 60rows, one field is a subview of 5 to 60 rows, in the 
> subview one field is a subview of 10/50 rows

So there are perhaps a few thousand non-empty subviews in all?

> In my code I simply create a storage and extract some piece of data 
> from c4gis_param (small table):
>
>   if (vxg->is_file())
>   {
>     c4_Storage sto(vxg->get_nativesys_(),false);
>     if (ok)
>     {
>       c4_GisSpace space;
>       space.loadParams(sto); //this loads information
>     }
>   }
>   art_delete(vxg);
>
> the destructor of "sto" is VERY slow (several minutes), here is the 
> call stack when I break the app during process :

Destruction tends to walk through all subviews, that's all I can think 
of as reason for the slowness you describe.  Still, a few thousand 
subviews really is not very much, and taking minutes to go through 
everything sounds very strange.

Are you running the datafilde from a file server?  There might be a lot 
of very small I/O requests.

Also, please be sure to use a recent version of MK (best one right now 
is probably CVS head).  Subview handling is still being tweaked.

> Before making a separate test, does anybody have an idea of what's 
> happening ?

Another reason could be some performance problem with the memory 
allocator.  Subviews tend to do a lot of small allocations.  You did 
not mention column counts, but if there are many columns in the 
subviews, that will definitely lead to tons of tiny allocs/releases.

-jcw



More information about the Metakit mailing list