[Webinar] Streamline your web hosting managementRegister Today

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 132
  • Last Modified:

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.

1 Solution
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 ;)
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.


Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now