xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Shraibman <...@p1.selectacast.net>
Subject Documents take up 100k!!
Date Thu, 11 May 2000 03:55:53 GMT
When I run the program below on a Linux box with blackdown-1.2.2-rc4 it
takes up 55megs!!  Assuming 5 megs for the base jvm that comes to 100k
for a little document!  Why would a Document take 100k?


=======================================
import java.util.*;

public class Documentmem  {


    public static Vector vec ;
    public class container {

 Object value;
 container (int value){
     this.value = com.xtenit.xml.XMLUtil.getDocument(
           "<base ><child  field1=\"text\" field2=\"string\" /></base>"
           );
 }

    }

    public container getCont(int value){ return new container(value); }

    public static void main(String args[]){
 int loop = Integer.valueOf(args[0]).intValue();;
 vec = new Vector (loop);

 Documentmem im = new Documentmem();

 for(int i = 0; i < loop ; i++)
     vec.add( im.getCont(i));;
 System.err.println("done adding "+loop+" Documents");
 try{
     while (true) {Thread.sleep((long) 100 * 365 * 24 * 3600);} //sleep
for 100 years.
 }catch ( InterruptedException e){
     System.err.println(e);
 }

    }
}





Mime
View raw message