On Mon, Jun 18, 2007 at 09:50:03AM +0200, Abdelrazak Younes wrote: > Dov Feldstern wrote: > >Jean-Marc Lasgouttes wrote: > >>>>>>>"Dov" == Dov Feldstern > >>>>>>><[EMAIL PROTECTED]> writes: > >> > >> > >>Dov> Hmm, I just came across this yesterday when trying to figure out > >>Dov> what was going on with bug 3011, and wondered about it. I'm not > >>Dov> sure if this is what you mean or not, but it might be relevant... > >> > >>Dov> > >>http://www.lyx.org/trac/browser/lyx-devel/trunk/src/Paragraph.cpp?rev=18599#L446 > >> > >> > >> > >>Yes, what I mean is that in this case we would have to recreate the > >>structure instead of update it. I do not know how costly it is but > >>Abdel is confident that it is not a problem. > >> > >>JMarc > >> > > > >Why do we need that structure at all? Given that our char_type is > >32-bits, and we don't use all 32, we could do something like the > >following: the insets themselves could be stored in a hash table, > >without storing their positions in that structure. At each position in > >the paragraph where an inset appears, instead of just the META_INSET > >character, we store an actual key into the hash table. (From the comment > >on META_INSET I understand that we don't use any values above 0x20001 > >--- which means that we have more than enough room for keys to as many > >insets as we'd like in a single paragraph...). > > We have to make sure that these are not proper Unicode symbols.
As there are only ~2^20 of them nowadays this sounds feasible... Andre', waiting for the day when Unicode is no more sufficient ;-}