Jump to content

Include Mistery


ptrex
 Share

Recommended Posts

Some of the AutoIT users have different thought of how the "include" works. And for some it might be still a mistery.

If you have made an include like IE.au3 which has a lot of functions in it, how many functions are loaded in the script.

Only the functions you address in your scriot. Or all the functions from the include file, wether or not used ?

Could some clarify this, and maybe add this to the documentation of the "include" function, to clearify the mistery.

Thanks

Link to comment
Share on other sites

Some of the AutoIT users have different thought of how the "include" works. And for some it might be still a mistery.

If you have made an include like IE.au3 which has a lot of functions in it, how many functions are loaded in the script.

Only the functions you address in your scriot. Or all the functions from the include file, wether or not used ?

Could some clarify this, and maybe add this to the documentation of the "include" function, to clearify the mistery.

Thanks

if you mean @ compile.

all functions are put in the script @ compile time. since there is execute().

gonna post an idee about this soon :)

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

Link to comment
Share on other sites

@Wouter

That' s what I thought as well, but it is not well documented in the Help file.

@Jpm Can this be arranged to add this to the documentation please. :)

Thanks for clarifying this again.

Regards

ptrex

I never know/use about @compile perhaps your are speaking about addition done by Scite environment as #something. I hope they are documenting overthere

Back to #include, AutoIt does suppress anything from an include file even if it is compiled.

Compile or not the script should work the same. :(

Link to comment
Share on other sites

@jpm

"@compile" is the short notation of "at complie time" (that' s what I understood at least.

Regarding the "Include", I don' t understand what you mean with suppres ?

The basice question is if you compile a script where some include was specified, does the compiled file include all the functions (from the include) or only the once used in the script you compile.

let's say I use #include<date.au3> at the top of the script.

And I would use in my script only the _DateDaysInMonth() function, what will be incorporated in the compiled script?

Only the _DateDaysInMonth() function specification from the include or the total include file.

ptrex

Link to comment
Share on other sites

@jpm

"@compile" is the short notation of "at complie time" (that' s what I understood at least.

Regarding the "Include", I don' t understand what you mean with suppres ?

The basice question is if you compile a script where some include was specified, does the compiled file include all the functions (from the include) or only the once used in the script you compile.

let's say I use #include<date.au3> at the top of the script.

And I would use in my script only the _DateDaysInMonth() function, what will be incorporated in the compiled script?

Only the _DateDaysInMonth() function specification from the include or the total include file.

ptrex

Thanks for the @compile.

for "suppress" I could have say omitted.

#include just do an internal concatenation to you script of the include files so the total scripts lines will be executed.

To be clear a non referenced functions is process but never call as when the script is not compiled. :)

Link to comment
Share on other sites

@jpm

To be clear a non referenced functions is process but never call as when the script is not compiled.

You are talking about NOT compiled script, but the question is about compiled scripts.

Can you explain what happenes if it is compiled ?

Thanks

Link to comment
Share on other sites

@jpm

You are talking about NOT compiled script, but the question is about compiled scripts.

Can you explain what happenes if it is compiled ?

Thanks

I am sorry , I get you confused with the compiled stuff.

a compile script is a concatenation of the script + all reference include added to an autoit3.exe.

you can see it if you decompile a script you find everything

I hope that clarify :)

Link to comment
Share on other sites

@jpm

OK.

This means in order to keep the compiled script as small as possible, the include file should be kept as small as possible.

Can I suggest that you add this to the documention. Because some people are confused about this.

And because of that some people are making REALY huge "include" files,

without seeing the consequence of this, when compiling.

So adding your explanation to the "include" function in the HELP file, would clarify this for ever !! :)

a compile script is a concatenation of the script + all reference include added to an autoit3.exe.

you can see it if you decompile a script you find everything

Many thanks in advance.

ptrex

Link to comment
Share on other sites

@jpm

OK.

This means in order to keep the compiled script as small as possible, the include file should be kept as small as possible.

Can I suggest that you add this to the documention. Because some people are confused about this.

And because of that some people are making REALY huge "include" files,

without seeing the consequence of this, when compiling.

So adding your explanation to the "include" function in the HELP file, would clarify this for ever !! :)

Many thanks in advance.

ptrex

I will for .124

Thanks :(

Link to comment
Share on other sites

Would it be possible to create something like "#include-referenced", that would only include the referenced functions from a file?

I will like it but that really a more complex job than what is doing today the AutoIt compilation.

Today you have option in Au3Check which list in a file the reference/nonreference variable info.

Not sure for Functions.

Perhaps somebody can do a Wrapper around it to have smaller size after compilation for big includes. :)

Link to comment
Share on other sites

  • Moderators

I will like it but that really a more complex job than what is doing today the AutoIt compilation.

Today you have option in Au3Check which list in a file the reference/nonreference variable info.

Not sure for Functions.

Perhaps somebody can do a Wrapper around it to have smaller size after compilation for big includes. :(

This may acctually be more complicated than I had first thought. It would still need to pull in all the Global Consts and also any functions that the referenced functions call. :)
Link to comment
Share on other sites

Would it be possible to create something like "#include-referenced", that would only include the referenced functions from a file?

This has been discussed thoroughly in a few topics that I can remember over the time that I have been with AutoIt.

I have seen alot of demand for it. Someone would need to actually create an "IncludeSuppressor" I think that would make quite a big hit. It would require alot of time and thought. Because if the #Include didnt have functions it would be different than if it had ONLY functions.

One thing that must be thought of as well is you would have to "COPY" the functions from that #Include <file.au3> to another #Include <suppressedFile.au3> or something like that.

I hope this helps some,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

I think there was more complexity, involved than only building a 'suppressor' as far as I remember from the previous discussions.

Sometimes 'Includes" have functions that call other "includes" and so on ...

So this is practically impossible to trace it all back, which function comes from which include and call which function(s).

I could be wrong here, but that's where it ended.

Taking this in account, I can only advise the "Enthousiastic" Include developers, to be aware of this.

And therefor try to play an other ballgame.

One apporaoch is, let's take for example the IE.au3 or Excel Include,

first develop a main "include" that holds the basic functions.

Than develop additional "include" with functions grouped by nature, like all formatting functions together.

Then an other one, which hold all the writing to Excel functions.

An other one which hold all retrieving of data from excel. And so on, etc...

This way the users can decide. If they are not interested in formatting, they don' t need to INCLUDED it.

This is not the perfect world. But at least this is a more structural way to avoid the problem.

Other thoughts are welcome. :)

Link to comment
Share on other sites

I think there was more complexity, involved than only building a 'suppressor' as far as I remember from the previous discussions.

Sometimes 'Includes" have functions that call other "includes" and so on ...

So this is practically impossible to trace it all back, which function comes from which include and call which function(s).

I could be wrong here, but that's where it ended.

Taking this in account, I can only advise the "Enthousiastic" Include developers, to be aware of this.

And therefor try to play an other ballgame.

One apporaoch is, let's take for example the IE.au3 or Excel Include,

first develop a main "include" that holds the basic functions.

Than develop additional "include" with functions grouped by nature, like all formatting functions together.

Then an other one, which hold all the writing to Excel functions.

An other one which hold all retrieving of data from excel. And so on, etc...

This way the users can decide. If they are not interested in formatting, they don' t need to INCLUDED it.

This is not the perfect world. But at least this is a more structural way to avoid the problem.

Other thoughts are welcome. :)

You are correct. It would be very hard to trace back all of the includes, but my idea or thought on the matter is just because you cant supply a full solution doesnt mean that a 1/2 or 3/4 solution wouldnt satisfy the majority.

Only certain include files could be used with "IncludeSuppressor". It would then even possibly set a "standard" for "TinyIncludes".

Just my thoughts,

JS

AutoIt Links

File-String Hash Plugin Updated! 04-02-2008 Plugins have been discontinued. I just found out.

ComputerGetInfo UDF's Updated! 11-23-2006

External Links

Vortex Revolutions Engineer / Inventor (Web, Desktop, and Mobile Applications, Hardware Gizmos, Consulting, and more)

Link to comment
Share on other sites

Any solution is welcome as far as I am concerned.

I hate to use large Include files personaly !!

Because is it overkill (on functions), unstructured (for bug tracing), overload (on performance), etc .....

At the moment I avoid using them, as long as there' s not other light in the tunnel.

Regards,

ptrex

Link to comment
Share on other sites

  • Developers

Any solution is welcome as far as I am concerned.

I hate to use large Include files personaly !!

Because is it overkill (on functions), unstructured (for bug tracing), overload (on performance), etc .....

At the moment I avoid using them, as long as there' s not other light in the tunnel.

I know that this has been looked at before ... believe KJACTIVE developed a script for this.

The challenge will be to make sure all functions needed are included. Also the functions referred to with HotKeySet(), Call(), GUISetOnEvent and ObjEvent() .

My question now is the same as then: What are we trying to solve ? Only thing I can imagine is to save a couple of Kbs... IE.au3 adds 18Kb to the EXE when included.

I fail to see the problem with using them as they are .... the words "overkill", "unstructured" and "overload(on performance)" sound more like guess work than proper testing and analyses to me ...

Anybody did some testing to show the difference in performance ?

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

Addressing size:

Stop for a second and think about other scripting languages that are as powerful as AutoIt. How big are compiled scripts in them? Can you even compile your scripts in them? Do they require a large run-time?

Addressing performance:

As the saying goes, "pre-mature optimization is the root of all evil". Optimize your code first (with benchmarks) and then we'll see where the real performance bottlenecks lie. I would be willing to bet that I can find more performance gains optimizing the referenced code in a script than I can find by eliminating unreferenced code from a script.

Link to comment
Share on other sites

@JdeB

Not tested anything yet.

But overload in performance is not so much the script or Exe file. Rather than than the performance indeveloping, using these large "include" files.

This topic is based on someone saying, he has plans to make a new Excel.au3 include from scratch.

With the intention to add more in there than thera alread is in the curent one.

I am not fond of this so kalled" overkill" aproach.

Did you ever try to work such an overloaded include file. :)

I don't like it anyhow.

And I am not asking for a magic script to solves all this anyhow.

I only wanted know how AutoIT works in the background.

And after this all has been said, I still recommend to work as I mentioned before.

And this of the sake of the performance of developing !!

Thanks for you input anyhow.

ptrex

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