1

In a Titanium project, when you have unused javascript files (I mean js that are not required/included anywhere), are them compiled or executed in the final app executable? could it produce resource consumption (memory, cpu) to have those files?

thank you

itsjavi
  • 2,574
  • 2
  • 21
  • 24

1 Answers1

1

These files are not compiled (JavaScript is an interpreted language, but I'm not sure you meant compiled?) nor are they executed unless you explicitly make it so, but they are included in your resource bundle.

Since Titanium does not have a way of knowing what files you will be using, it assumes anything in your resources bundle is needed. However, anything with a *.js extension will be base64'd , so that cuts down on the size.

If these files are truly unused, then they will have zero detectable impact on system memory or CPU cycles.

The only impact it would have would be on application size, but you would need to have a very large javascript file, probably upwards of millions of lines, before it became noticeable.

Community
  • 1
  • 1
Josiah Hester
  • 6,065
  • 1
  • 24
  • 37