ActiveX object size


I've made an ActiveX type library for use with ASP. Theres not much code in it, but the size is very large (340K). How do I decrease the size? Disabling debugging doesnt help at all.

The main reason I want to decrease the size, is that the object is apartment threaded (and need to be). Im pretty sure this means that each instance will be a copy of the object. If this means copying all (or most) of the 340K each time, I would really like to cut down on the size, to gain performance on the webserver.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I don't understand your reasons of thinking that each instance will have 340k size. All code is shared with copy-on-write attribute, and i don't see how apartment model will change this. All data is duplicated, of course.

For the first question, I cannot give you a straightforward solution (perhaps nobody can). 200-300 kb is usual Delphi overhead due to using components. You may try not to use TForm and TControls but then there's no point of using Delphi - you may write a much more compact code with Visual C++.

Of course, you may exclude all packages from your binary file, and it will weigh 30-40K afterwards, but you'll have to install packages separately on each computer to run your code.

If my comment answers your question, please make it an answer ;)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
pedeAuthor Commented:
>All code is shared with copy-on-write attribute

Really? Never heard of that, thats why I asked the question; to get some more information.

This is not a visual component. Delphi is used because its much easier to work with.

I suppose you have answered my question, if there is no more to it than that.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.