Component Class


#1

Component class
string property “componentName” can be used as both a name and ID
so surly it makes more sense for ComponentID to be declared integer datatype instead of string aswell, so it can be more useful
in situations where function pointers ARRAYS are being used, allowing components to invoke functions/class methods via
this integer index property. Converting string property ComponentID, to integer, causes function call overhead, wasting cpu cycles, so it makes more sense to have atleast 1 integer property, adding another property obviously wastes RAM etc


#2

It’s always useful to bear in mind the 2 rules of optimising when thinking about things like this:

  1. Don’t do it
  2. Don’t do it yet

In light of the second point, can you provide a test case in which this actually shows up in a profiler as being a performance issue?