"Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
>>>>> "Hrvoje" == Hrvoje Niksic
<hniksic(a)arsdigita.com> writes:
     Hrvoje> I might be misreading the code, but to me this indicates a
     Hrvoje> possibility that get-text-property requires time
     Hrvoje> proportional to n^2, where n is the number of extents in
     Hrvoje> the buffer.
 I haven't done a careful analysis of extent_at_byteind, but note the
 "prior" argument in the call to extent_at_byteind: 
I'm aware of the PRIOR argument; I just wasn't sure that it was
helping performance.  extent_at_byteind calls the mapper function
every time, and then sorts the results, etc.  Or is that not the case?
For example, wouldn't get-text-property be faster if it were
implemented with one call to map_extents_bytind which did all the
necessary magic?  Am I wrong in assuming that map_extents_bytind
traverses the extents in display order?