General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion size limit of DocumentProperty

  • achu

    size limit of DocumentProperty

    Participants 1
    Replies 2
    Last Activity 12 years, 8 months ago

    Is it possible to assign a very big string to the DocumentProperty? what's the size limit of DocumentProperty?

    I try to pass data from IE at the resource manager back to XMetal.

    Reply

    Derek Read

    Reply to: size limit of DocumentProperty

    All I can say at this point is that in theory there should be no limit. How big is your string?

    A quick stress test in XMetaL Author 6.0 shows that a million characters is not an issue. It might take quite a while to build the string (the pure JScript looping part).

    [code]// XMetaL Script Language JScript:
    var curDoc, curDocProps;
    curDoc=Application.ActiveDocument;
    curDocProps=curDoc.CustomDocumentProperties;
    bigStr = “”;
    for (i=0;i<100000;i++) {
    bigStr += “1234567890”;
    }
    Application.Alert(“bigstr.length = ” + bigStr.length);
    curDocProps.Add(“cdpropsBigStr”, bigStr);
    var s = curDocProps.item(“cdpropsBigStr”).value;
    Application.Alert(“cdpropsBigStr.length = ” + s.length);[/code]

    If you increase the number of iterations (or increase the string that is being added) you can easily test bigger values. Note that this is a very inefficient way to build a string in JScript so it will take exponentially longer the more times you iterate through, but it is an easy way to stress the system. So, if you have a large text file on disk you might use Application.FileToString to read it in instead.

    Reply

    Derek Read

    Reply to: size limit of DocumentProperty

    Official word from our dev team is that the string size is only limited by the available application-heap memory at the time of the operation.

    What is the limit you are seeing in your case?

    Reply

  • You must be logged in to reply to this topic.

Lost Your Password?

Products
Downloads
Support