Re: commit head: bidi related performance fix in fl_BlockLayout::_doInsertTextSpan()

From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Fri Jul 26 2002 - 17:57:43 EDT

  • Next message: Jesper Skov: "Re: Statistics"

    Hi Joaquin,

    > Unfortunately nearly is the right word :)
    > I'm still having some extra splits with the "strong type a -> weak ->
    > strong type b" combination.

    There are two types of this combination where you can get
    unncessary split. One case is where the strong/weak boundary is at
    the end of the span of text for which we are to create the run.
    Unfortunately in this case there is nothing we can do about it,
    because the text after the weak character(s) have not yet been
    inserted, and so we must anticipate the worst case and split. I have
    done some tests with problemfonts.abw and this does not seem to
    figure at all.

    The other is in the case where the text for which we are inserting the
    run is made up of several segments in the piecetable, i.e., when the
    while loop runs more than once. In my tests I got about 37 times
    when the while loop run 2 times, and about 7 when it run 3 times,
    and 99 times where it run 1 time. This problem would seem to be
    responsible for all the unnecessary splits. Now, this case could be
    handled by the code, but it becomes quite a bit more complex and
    will require lot of debugging not to screw things up for genuine
    bidirectional documents. I have spent several hours on it tonight,
    and given up for now -- the reversed loading bug makes it very
    difficult to test -- but I will keep it on my TODO list, and come back to
    it at some point in the future.

    > With your code I'm getting 4556396 of ::find_slot, and with if (false)
    > I'm getting 3884410.

    I think there is probably scope for optimatization in the run
    construction process and that we could cut this down even without
    cutting the number of runs initially created. Any idea where the
    ::find_slot calls originate? (incidentally, how big is your document?)

    Tomas



    This archive was generated by hypermail 2.1.4 : Fri Jul 26 2002 - 18:06:57 EDT