Jump to content

Size of autoitsc.bin - a thought...


Recommended Posts

I've taken my brave pills - and I thought I would throw a thought into the ring....

First - a few disclaimers

I am not a dev - I know very little about C++ so what I am suggesting here may be absolutely stupid - so I would like to apologise in advance for any annoyances it may cause.

A bit of background

One of the initial design goals for AutoIt V3 was to keep the exe to below 100k. From time to time - I read on this board that some functionality of AutoIt must remain in UDF form as it is not considered "core" and/or due to size of code. We know that @Nutster , for instance, wanted to write his own StringRegExp libraries rather than use some publically available libraries - usually because of the size of code - trying to keep the size of compiled Auto3 down.

I have also followed the occasional thread that gets started up - urging the devs to try and write a compiler that splits up the source by function - and include only the functions necessary in the compiled exe. I have noted the devs responses to these requests...

Anyway - here is my thought..

I quite like the idea of small exes.

As I understand it - when a script is compiled - the script gets added to a copy of the Autoitsc.bin - and a few other clever bits to make it all work.

Can the Autoitsc.bin be split into sections that may represent a section of functionility.

For example:-

Autoitsc1.bin could contain "core" functions and would generally be included in all compliled scripts

Autoitsc2.bin could contain all GUI functions

Autoitsc3.bin could contain all COM functions

Autoitsc4.bin could contain all StrigRegExp functionality

The idea bing that if you had a script just containing a few file moves and a message box - you would only need to include Autoitsc1.bin in the compiled code. If you had a GUI - you would add in Autoit2.bin. etc

I give these as examples only. I don't know the relative sizes of the code base that covers these functions - but I do hope that it illustrates the idea.

I would hope that if this were possible - It would help meet a design criteria of the complied code being as small as possible, and, it would hopely allow the devs to add functionality that at present thy would not want to add because of the volume of code it would add.

Anyway - my brave pill is beginning to wear off - so I'd better post this message. :)

Link to comment
Share on other sites

i myself would find it VERY cool if autoit only embeded the functions that are used in a script.

i have seen sevral reply's stating that this is not possible with Eval/Execute.

but thats just silly IMO since we can use like "#force_include_func MsgBox"

also the multiple .bin's arent worth the hassle IMO since most ppl usually use a bit of evrything.

Edited by w0uter

My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll

Link to comment
Share on other sites

steve8tch, first, I must ask the obvious, if you have noted our replies, why are you bothering asking again? Your idea has been covered before, too.

Now, the response. Your idea is actually worse than the current situation. Having separate modules will produce a lot of waste as each module will have a lot of replicated code. A small script not using very many functions would indeed compile to a small executable but any non-trivial script would be much larger than the current executables.

It would likely entail a compelete rewrite of AutoIt, too.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...