We've been using ObjectModel library as a core element in our app for the last 2 years and we are thrilled with the features. It has helped immensely to find bugs during development phase. I have also been very impressed with @sylvainpolletvillard 's responsiveness and clarity (Thanks!).
Soon we will launch and we discovered that it really doesn't make sense to go live with ObjectModel at the core of all of our objects (at least not in its current state of performance).
We have a ton of "convenience getters" that often call each other and return easy to use arrays objects and values. The performance penalties of ObjectModel seem to amplify with each "nested" getter.
I am opening this issue in hopes of starting a dialog including analysis of the current state and proposals for improvement.
My initial measurements are visible in this comment and in the codepen.
My first thoughts and questions:
- Why do "extended" props (those not included in the definition of an unsealed model) need to be validated or even checked?
- Could it make sense to offer a "production mode" for OM that could do a run-time type check on instantiation and then return a basic object instead of a proxy?
2b. or even a mode that could allow for full type checking in development and maximum performance in production mode.
- What are the most "expensive" parts of the OM architecture?
We've been using ObjectModel library as a core element in our app for the last 2 years and we are thrilled with the features. It has helped immensely to find bugs during development phase. I have also been very impressed with @sylvainpolletvillard 's responsiveness and clarity (Thanks!).
Soon we will launch and we discovered that it really doesn't make sense to go live with ObjectModel at the core of all of our objects (at least not in its current state of performance).
We have a ton of "convenience getters" that often call each other and return easy to use arrays objects and values. The performance penalties of ObjectModel seem to amplify with each "nested" getter.
I am opening this issue in hopes of starting a dialog including analysis of the current state and proposals for improvement.
My initial measurements are visible in this comment and in the codepen.
My first thoughts and questions:
2b. or even a mode that could allow for full type checking in development and maximum performance in production mode.