Re: 5291 RTF import slow

From: Mike Nordell (tamlin@algonet.se)
Date: Wed Sep 24 2003 - 04:54:37 EDT

  • Next message: tomasfrydrych@yahoo.co.uk: "Re: 5291 RTF import slow"

    Hubert Figuiere wrote:

    > Something we should investigate is whether we often compare property
    > names from inside the PieceTable or beetween PieceTable and stuff loaded
    > from the file.
    > The idea is to use "token" inside the piecetable (think numeral
    > constants or enums) and only compare that.

    This has been brought up earlier:

    http://www.abisource.com/mailinglists/abiword-dev/01/January/0553.html
    http://www.abisource.com/mailinglists/abiword-dev/00/December/0269.html

    > After that we just need to
    > associate a string property name with a constant. BTW, that would
    > probably save some RAM too as a 4byte int is smaller than a string.

    The property system itself would obviously need both, why that wouldn't save
    anything. The only place I see any possible memory savings would be if the
    properties (in the document) after parsing were represented by something
    like the following. Please disregard struct/class and whatever, it's only a
    pseudo-ish idea.

    struct DocProp
    {
        bool isEnum;
        union {
            enum Propert prop;
            char* pszDocOwnedProp; /* for unknown but still saved props */
        }
    }

    Just an idea.

    /Mike



    This archive was generated by hypermail 2.1.4 : Wed Sep 24 2003 - 05:09:03 EDT