Executable file-size and user-created Modules/Classes

I have a personal module named Rad, where I put my own methods inside it.

How does the compiled executable’s file-size varies for each of the following scenarios?

  • Rad is imported into the project, and none of the methods are used.
  • Rad is imported into the project, and 1 or 2 (or anything except all) of the methods are used.
  • Rad is imported into the project, and ALL of the methods are used.

And what difference does it make (regarding file-size and dependencies or anything that I would not yet know)
if Rad is a regular module, or an external module.

Rad is entirely stripped out as long as you use NOTHING from Rad

Rad is retained - code is not stripped at the method level

[quote=166971:@Radium Radiovich]
And what difference does it make (regarding file-size and dependencies or anything that I would not yet know)
if Rad is a regular module, or an external module.[/quote]
none - internal external is an IDE notion
The code has to be compiled into the resulting exe to be used

So, if Rad contains a large amount of methods (say 20k) and only 100 of them are used in a project, all of the 20k methods are compiled and included into the exe?
How much difference in file-size does that make? is it considerable?
And can an IDE Script be implemented to outcast the unused methods prior to build?

Another Scenario:
Rad is a class/module, which contains 20k methods in total, divided between lots of subclasses.
Does Xojo strip the code at the class level to leave unused subclasses out?

[quote=166990:@Radium Radiovich]So, if Rad contains a large amount of methods (say 20k) and only 100 of them are used in a project, all of the 20k methods are compiled and included into the exe?
How much difference in file-size does that make? is it considerable?
[/quote]
Thats going to vary based on your code
If there’s only a handful of methods not much
If there are thousands it could be quite a bit.

You’d have a hard time identifying the used vs unused members

[quote=166990:@Radium Radiovich]
Rad is a class/module, which contains 20k methods in total, divided between lots of subclasses.
Does Xojo strip the code at the class level to leave unused subclasses out?[/quote]
Yes - unused classes are stripped

So the best candidate is dividing the methods between lots of subclasses, and thus as a result, although not completely, strip out most of the unused classes.

Another question popped in my head:
Does the IDE support modules/classes that contain 20k or more of items?

You really have to ask yourself why you would do something like that. 20K of anything will become horribly unwieldy. Organize it into smaller packages.