[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: KSpread: Style Storage
From:       "Ariya Hidayat" <ariya () kde ! org>
Date:       2006-06-22 7:25:38
Message-ID: ba035dd10606220025l4317d4d9j5e86fe682fc5e6f9 () mail ! gmail ! com
[Download RAW message or body]

> If we split the style up so that a style can specify only a subset of
> the available properties, then it would only be necessary to insert a
> single new Style instance covering the whole area which just specifies
> the new font.  This gives us a low memory cost which is a big reason
> for replacing the Style handling system.  Obviously this would require
> a way of handling the priority of  multiple styles which cover the
> same cell and specify the same property - but a simple counter which
> is incremented for each new style would probably be suitable.  In
> order to lookup a property for a cell, it will be necessary to look at
> each style which covers a particular region and select the 'newest'
> style instance which specifies that property.

Exactly what I proposed in that DESIGN document, although Robert
explains it better (that's the different between native speaker and
non-native :-)
For finding the "total style", the stack position should be enough. In
the 3-D analogy, you just take a line normal to the sheet at that
particular cell location and track all styles that intersect this
line.

> However, it would be possible to cache a merged style for a
> particular cell (which is what Gnumeric does).

Definitely a good idea. For example, the styles for *potentially*
visible cells can always be held in the cache.


Personally, I believe the tree can come later if we want to try the
style/format pieces. A linear brute force search is enough to prove
first that the concept works. Granted, that's probably dog slow, but
better to have a working system first.  If it works and we have no
problem with that (forget the performance), then we may profile it to
see where the bottlenecks are. Perhaps it's not in the style search
part at all, who knows?


Regards,

Ariya
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic