Ignore:
Timestamp:
2004-01-06T11:44:24+13:00 (20 years ago)
Author:
cs025
Message:

Restricted size of document list and improved HTMLDocument handling

Location:
trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/doctypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/doctypes/DocumentList.java

    r6101 r6346  
    3232  GS3SQLConnection           connection; // used to query the SQL database
    3333
    34   private static final int maxSize = 10;
     34  private static final int maxSize = 3;
    3535
    3636  public DocumentList(GS3SQLConnection connection)
    3737  { this.idFactory = null;
    38     this.list  = new DocumentInterface[10];
     38    this.list  = new DocumentInterface[3];
    3939    this.used  = 0;
    40     this.size  = 10;
     40    this.size  = 3;
    4141    this.count = 0;
    4242    this.connection = connection;
     
    4545  public DocumentList(DocumentIDFactoryInterface idFactory, GS3SQLConnection connection)
    4646  { this.idFactory = idFactory;
    47     this.list  = new DocumentInterface[10];
     47    this.list  = new DocumentInterface[3];
    4848    this.used  = 0;
    49     this.size  = 10;
     49    this.size  = 3;
    5050    this.count = 0;
    5151    this.connection = connection;
  • trunk/gsdl3/src/java/org/greenstone/gsdl3/gs3build/doctypes/HTMLDocument.java

    r6284 r6346  
    5555    //    HTMLDoc htmlDoc;
    5656    HTMLTidy tidyDoc;
     57    if (url.getProtocol().equals("file"))
     58    {
     59    }
    5760    if (url.toString().startsWith("file://"))
    5861    { //htmlDoc = new HTMLDoc(url, url.toString().substring(7));
     
    6871    }
    6972   
     73    System.out.println(Runtime.getRuntime().freeMemory() + " " + Runtime.getRuntime().totalMemory());
     74
    7075    this.domDocument = tidyDoc.getDocument();
     76
     77    Runtime.getRuntime().gc();
     78    System.out.println(Runtime.getRuntime().freeMemory() + " " + Runtime.getRuntime().totalMemory());
    7179 }
    7280
Note: See TracChangeset for help on using the changeset viewer.