Hi,
There are mainly 3 reasons for the size increase in FlexCel 5:
1) Xlsx support. Xlsx is so different from xls that FlexCel 5 is actually 2 products: and xls processor and an xlsx processor. There is a lot of new code dedicated to dealing with xlsx, from fully optimized xml readers and writers to a zip library to read/write xlsx.
2) Recalculation engine. FlexCel 5 has a complete recalculation engine that can recalculate virtually anything that Excel can (and this includes linked files, matrix formulas, user defined functions, most of the 300 functions Excel supports, etc). The recalculation engine also adds a lot of code to v5. In FlexCel 3 we wouldn't recalculate formulas, they just would be left not calculated.so Excel would recalculate them on open. But if you had a FlexCelGrid and changed values, FlexCel 3 wouldn't recalculate them, In v5 we are coming very soon with a full pdf/html reporting engine, and for them to work, we need to calculate the file before exporting.
3)Generics. This is a little different from the other 2, in the sense that it doesn't add functionality. But in v5 we use generics everywhere, and in Delphi generics are incredibly bloated. Every time you make a TList<something> the full code of TList is linked again in the exe. We've trimmed a lot of this bloat from 5.0 to 5.1 (by using specially crafted collections) a 5.1 reduced exe size in about 1mb, but I calculate there is still about another mb that could be shred if generics weren't as bloated as they are.
From the 3 items, there isn't much that we can do about 1 or 2, FlexCel 5 does provide a lot of new functionality and it is more than 1/2 million lines of code. It is much more near to a full Excel that you are embedding in your app, and of course, this takes space.
About 3), well, as said, we already trimmed more than 1mb by using specially designed collections, but reducing more the size requires a compromise in where do we put our development effort. Do we use it for trying to go after the other mb or do we focus in finishing pdf/html exporting? At the moment we believe more features is more important than 1 mb less in the code.
The last thing about 3) is that as the code linked for every TList or TDictionary is the same, there is a lot of redundant code in the exe, and while the "install size" grows, setup size (which is zipped) remains mostly the same.
When we reduced the 1mb from 5.0 to 5.1, the zipped size just wen back a couple of kb.
And as normally install size isn't that important (because hard disks are huge), and what we care about is setup size (because that's what we have to redistribute), the savings from shrinking generics aren't that great. IT would be interesting to know what your zipped sizes are for your exes. While the v5 should still be bigger, difference should be much less.
Regards,
Adrian.