Smaller libraries....

Hi !

Just to give you one idea on how to cut down the size of the OCC libraries, I use TKernel.dll (Windows) as an example.

The original file was 2.3MB in size.

I changed to compiler to optimize for "Minimize size" instead of "Maximize speed" and the new dll file was 1.7MB in size.

That's half a meg for just one dll file.

And the difference in speed is pretty much the same.

Mikael

Robert Boehne's picture

Mikael:

I have to disagree with you on this point. Run-time speed is of utmost importance, the size of a dll file is really insignificant. If you are doing any serious use of OCC, then you need to have it fast, if a dll takes up 3Megs or 5Megs, well I would call that a secondary consideration.

In the typical cad models I get from users in my industry, a STEP file is generally more than 20 Megabytes. Imagine waiting for a _large_ one to load! I have seen these up to hundreds of megabytes. Consider also the competition, ACIS would generally cost $100,000 per year, so the cost of an extra Gig of ram is really insignificant in comparison.

You could also do more specific optimization, and leave out the things that cause code bloat. You may not want to ruroll loops, or inline function calls for instance. Another problem is that some compilers need to have extra symbol information for relocatable code. The compiler is really to blame in that case though.

Also, as much as I have been poking around the source, I haven't seen a C++ template used anywhere. Now, I probably might have just missed them, but I thought that WOK was used to create explict class code as an alternative to using C++ templates. Please, correct me if I'm wrong, this would be a revelation as far as my knowledge of OCC is concerned.

Robert

Mikael Aronsson's picture

Hi !

> I have to disagree with you on this point.
> Run-time speed is of utmost importance, the
> size of a dll file is really insignificant.
> If you are doing any serious use of OCC,
> then you need to have it fast, if a dll
> takes up 3Megs or 5Megs, well I would call
> that a secondary consideration. In the
> typical cad models I get from users in my
> industry, a STEP file is generally more than
> 20 Megabytes. Imagine waiting for a _large_
> one to load! I have seen these up to
> hundreds of megabytes. Consider also the
> competition, ACIS would generally cost
> $100,000 per year, so the cost of an extra
> Gig of ram is really insignificant in
> comparison.

Ok, I understand what you mean, I do not come from the cad world so I did not look at it from your point of view, but you have a good point there, anyway this was more a response to people complaing about OCC being big, so I gave an example on how to cut dow the size, but thats the buty I guess, you can compile it they way you want.

> You could also do more
> specific optimization, and leave out the
> things that cause code bloat. You may not
> want to ruroll loops, or inline function
> calls for instance. Another problem is that
> some compilers need to have extra symbol
> information for relocatable code. The
> compiler is really to blame in that case
> though.

So true...

> Also, as much as I have been
> poking around the source, I haven't seen a
> C++ template used anywhere. Now, I probably
> might have just missed them, but I thought
> that WOK was used to create explict class
> code as an alternative to using C++
> templates. Please, correct me if I'm wrong,
> this would be a revelation as far as my
> knowledge of OCC is concerned.
>Robert

Oooops, sorry that was my mistake, I should keep my moth shut sometimes, I was assuming that templates where used, I did not check the source and you are of course 100% correct, there are no templates, shame on me.

Mikael

Mikael Aronsson's picture

Hi again !

How well does OCC compare to the competion, ACIS and what other that are out there ?.

I do not now much about these and it would be interesting to know a little how they compare to OCC (in functionality I mean).

Mikael

>ACIS would generally cost
> $100,000 per year, so the cost of an extra
> Gig of ram is really insignificant in
> comparison.
> Robert