Changeset 7336


Ignore:
Timestamp:
02/04/11 10:06:46 (14 years ago)
Author:
jschierm
Message:

kml: Changed kml and string_buf classes to handle classes for huge speedup.

Location:
issm/trunk/src/m/kml
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/kml/kml_object.m

    r7297 r7336  
    1111%  arguments constructs a new instance from the arguments.
    1212%
    13 classdef kml_object
     13classdef kml_object < handle
    1414    properties
    1515        id        ='';
  • issm/trunk/src/m/kml/string_buf.m

    r7297 r7336  
    1818%  arguments constructs a new instance from the arguments.
    1919%
    20 classdef string_buf
     20classdef string_buf < handle
    2121    properties
    22         init      =1000000;
    23         inc       =100000;
    24         max       =10000000;
     22        init      =10000000;
     23        inc       =1000000;
     24        max       =100000000;
    2525    end
    2626%     properties (SetAccess = private, GetAccess = private)
     
    148148%  check the buffer size and increase as necessary
    149149
    150             while (sbuf.len+length(str) > sbuf.size)
     150            slen=length(str);
     151            while (sbuf.len+slen > sbuf.size)
    151152                if (sbuf.size+sbuf.inc <= sbuf.max)
    152153                    sbuf.string=[sbuf.string blanks(sbuf.inc)];
     
    160161%  copy the string into the buffer
    161162
    162             sbuf.string(sbuf.len+1:sbuf.len+length(str))=str;
    163             sbuf.len=sbuf.len+length(str);
     163            sbuf.string(sbuf.len+1:sbuf.len+slen)=str;
     164            sbuf.len=sbuf.len+slen;
    164165
    165166        end
Note: See TracChangeset for help on using the changeset viewer.