[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:11:02
Message-ID: ba035dd10606220011y7447ca95na2d9b06481fb8da8 () mail ! gmail ! com
[Download RAW message or body]

> The plan is to use a tree to store the Styles - either an R+-Tree, with
> which's implementation I started, or a Quad-Tree or an oak ;-). I think, that
> we could exchange the backend (tree) later, if needed.

R+-tree is a smart choice for this particular style rect that you use.

> Now to the discussable thing: The Development Notes
> (http://websvn.kde.org/*checkout*/trunk/koffice/kspread/DESIGN.html) propose
> a splitting of the Style into smaller style pieces. As the current Styles are
> ref counted, I see no advantage in doing so. It would result in several
> lookups and slows things down. Therefore, I want to stay with the Style class
> in its current form.

No that's different issue (as Robert replied in another mail).
Reference counting only helps minimizing the memory use for shared
styles, but not with different type of styles (you can use a
hierarchical structure here, but that's another complexity).

In addition, based on my empirical observations, cells tend (most of
the cases) to have partial formatting only, e.g.  "bold" but seldom as
complete as "bold, black border, grey shaded, with number format
"##-###-##", Wingding font, vertical aligned". Thus, this saves quite
an amount of bytes if we choose only to store that relevant format
piece(s).

> Column and row insertions/deletions are cheap IMHO: They consume about 50 ms
> with 100.000 leaves processed.

Does this already take into account that the style/format rectangle
must be expanded as well? Example: if row 1 has "bold" formatting,
inserting a row below this one (which is the new row 2) typically must
set the row to have "bold" formatting as well, regardless of the old
formatting of old row 2.

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