Jump to content

more of a curiosity than a problem


Recommended Posts

So I have a script of about 1100 or so lines with several includes and other stuff making the .au3 about 45kb that compiles to 364KB.  I have another 1KB script of ONE LINE "run(program.exe /q)" that compiles to 760KB.

I'm completely baffled as to why that would be.

 

Like I said in the title, the size isn't a problem but it is very weird and I was wondering if anyone knew why something like this might occur.

Link to comment
Share on other sites

  • Moderators

Emolas,

I imagine that you have the upx file compressor activated for the first script. How are you compiling them?

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

Both are using UPX.  I did discover the smaller one was x86 and the larger was x64 so that had something to do with it.  Compiling the single line script in x86 shrunk it to 396KB but that still seems inordinately large especially when comparing it to another script 45X larger with probably 2000X the amount of code.

Link to comment
Share on other sites

  • Moderators

Emolas,

Remember that the code itself is a very small fraction of the overall executable - the majority by far is the built-in interpreter. I have 2 compiled scripts: the first has some 8000 lines and a good few additional icons; the second is only a few hundred lines - the difference when compiled is a mere 50k. it is the price you pay for stand-alone executables.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

  • Developers
54 minutes ago, Emolas said:

larger was x64

Don't think upx is done for x64 executables as yet.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

3 hours ago, VIP said:

1TB Hard Drive now cheaper and very popular.
1MB program is acceptable (:

That is different based on the final deploy environment, if the final user have to download that or have to update that with a 54kbs dial-up connection then 1MB is not so acceptable for only 1 line of code.

Anyways like @Melba23 point is the price you pay for stand-alone executables.

One thing I like most about AutoIt is in fact this, because you don't need Microsoft Runtimes or anything, just Windows.

Regards
Alien.

Edited by alien4u
Fix typo
Link to comment
Share on other sites

20 hours ago, Jos said:

Don't think upx is done for x64 executables as yet.

Jos

it has a check box in the compiler.  Whether it actually does anything or not I couldn't tell you.

 

Size really isn't an issue I was just interested at the fact that a one line script compiled was larger than a 3000 line one.  I had already chalked it up to one of those "weird things programs do" but figured I would ask if anyone had any solid reasons as to why just to satisfy my curiosity.  Common sense would say that the size difference between a 45 kb file and a 1 kb file would be 44 kb since they would both need the same interpreters and stuff so the smaller file compiling larger than the other one threw me.

 

Thanks for all the answers.

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...