makotok/Hanappe

Improvement of the cost of instantiation

Closed this issue · 1 comments

For instance generation of class.
It is realized by copying the variable to userdata.
Therefore, class variables increases, the instantiation expensive.

Consider whether be improved by utilizing the meta table.

I improved the logic of object creation.
However well, compatibility is lost.

There is a need to change in the following format.

-- Before
Class.__factory = MOAIObject

-- After
Class.__index = MOAIObject.getInterfaceTable()
Class.__moai_class = MOAIObject