Sign in to follow this  
Followers 0
Shaun Burdick

to Include or Not to Include?

2 posts in this topic

I am working on a program and I want to be as effecient and cost effective as possible. I am trying to trim down memory usage and file size and I have a question about the way AutoIT handles includes and unused variables.

I include <GUIConstants.au3> for a window I create. Now I use 4 constant variables in that file, once, in a function. I looked at the file and it contains 100+ variables that are declared globally.

My question would be, would it be more cost effective to copy the 4 variables out and make them local to the function or even hardcode them in the GUICreate call, or does AutoIT ignore unused variables?

Share this post


Link to post
Share on other sites



You can use a Constants Generator.

Extra declared Constants will be in memory if include whole file. The filesize of a compiled script would save a few kilobytes for including only what constants are needed.

:)

Share this post


Link to post
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
Sign in to follow this  
Followers 0