New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beans pre-compilation #1759

Merged
merged 2 commits into from Mar 7, 2017

Conversation

Projects
None yet
2 participants
@divdavem
Member

divdavem commented Mar 6, 2017

This PR adds support for beans pre-compilation and optimizes a bit aria.core.JsonValidator to avoid generating twice the same fast-normalization function when a bean can simply reuse the fast-normalization function of its parent.

@divdavem divdavem referenced this pull request Mar 6, 2017

Closed

Beans pre-compilation #26

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 6, 2017

feat #1759 Adding support for beans pre-compilation
This commit adds support for beans pre-compilation.
The new aria.util.BeanExtractor.extract method allows to retrieve from the
JsonValidator a compiled beans package as a javascript file to be used
instead of the original file containing Aria.beanDefinitions. The compiled
file is usually bigger than the original file, but is quicker to execute.

close #1759

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 6, 2017

feat #1759 JsonValidator optimizations
This commit contains a set of optimization in JsonValidator to avoid
generating several times the same fast normalization function when
a bean extends another bean without changing its properties.
@divdavem

This comment has been minimized.

Show comment
Hide comment
@divdavem

divdavem Mar 6, 2017

Member

Note that this PR depends on ariatemplates/atpackager#26

Member

divdavem commented Mar 6, 2017

Note that this PR depends on ariatemplates/atpackager#26

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 6, 2017

feat #1759 Adding support for beans pre-compilation
This commit adds support for beans pre-compilation.
The new aria.util.BeanExtractor.extract method allows to retrieve from the
JsonValidator a compiled beans package as a javascript file to be used
instead of the original file containing Aria.beanDefinitions. The compiled
file is usually bigger than the original file, but is quicker to execute.

close #1759

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 6, 2017

feat #1759 JsonValidator optimizations
This commit contains a set of optimization in JsonValidator to avoid
generating several times the same fast normalization function when
a bean extends another bean without changing its properties.

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 6, 2017

feat #1759 Adding support for beans pre-compilation
This commit adds support for beans pre-compilation.
The new aria.util.BeanExtractor.extract method allows to retrieve from the
JsonValidator a compiled beans package as a javascript file to be used
instead of the original file containing Aria.beanDefinitions. The compiled
file is usually bigger than the original file, but is quicker to execute.

close #1759

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 6, 2017

feat #1759 JsonValidator optimizations
This commit contains a set of optimization in JsonValidator to avoid
generating several times the same fast normalization function when
a bean extends another bean without changing its properties.
@fbasso

fbasso approved these changes Mar 6, 2017

@divdavem

This comment has been minimized.

Show comment
Hide comment
@divdavem

divdavem Mar 6, 2017

Member

@fbasso Thank you for your review!

Member

divdavem commented Mar 6, 2017

@fbasso Thank you for your review!

feat #1759 Adding support for beans pre-compilation
This commit adds support for beans pre-compilation.
The new aria.util.BeanExtractor.extract method allows to retrieve from the
JsonValidator a compiled beans package as a javascript file to be used
instead of the original file containing Aria.beanDefinitions. The compiled
file is usually bigger than the original file, but is quicker to execute.

close #1759

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 7, 2017

feat #1759 JsonValidator optimizations
This commit contains a set of optimization in JsonValidator to avoid
generating several times the same fast normalization function when
a bean extends another bean without changing its properties.
feat #1759 JsonValidator optimizations
This commit contains a set of optimizations in JsonValidator to avoid
generating several times the same fast normalization function when
a bean extends another bean without changing its properties.

@divdavem divdavem merged commit 43cb12c into ariatemplates:master Mar 7, 2017

1 of 2 checks passed

continuous-integration/travis-ci/push The Travis CI build is in progress
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 7, 2017

fix ATDebug flag introduced in #1759 and adding error messages
This commit removes the ATDebug flag introduced in #1759 because it caused
all templates to be compiled in debug mode (with line numbers).
This commit also adds new checks in BeanExtractor to be sure that the
corresponding configuration in the JsonValidator is correct for the
extraction with the given options to be successful.

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 7, 2017

fix ATDebug flag introduced in #1759 and adding error messages
This commit removes the ATDebug flag introduced in #1759 because it caused
all templates to be compiled in debug mode (with line numbers).
This commit also adds new checks in BeanExtractor to be sure that the
corresponding configuration in the JsonValidator is correct for the
extraction with the given options to be successful.

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 7, 2017

fix ATDebug flag introduced in #1759 and error messages in BeanExtractor
This commit removes the ATDebug flag introduced in #1759 because it caused
all templates to be compiled in debug mode (with line numbers).
This commit also adds new checks in BeanExtractor to be sure that the
corresponding configuration in the JsonValidator is correct for the
extraction with the given options to be successful.

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 8, 2017

fix/feat #1760 fixes and improvements for beans pre-compilation
This commit contains a set of fixes and improvements linked to beans
pre-compilation, introduced in #1759:
 - the ATDebug flag when compiling beans is now removed because it also
caused all templates to be compiled in debug mode (with line numbers)
 - there are new checks in BeanExtractor to be sure that the configuration
in the JsonValidator is correct for the extraction with the given options
to be successful
 - an issue with default values which were not correctly normalized in non
debug mode is now fixed
 - the bean extractor now further improves the size of output files when
onlyFastNorm is used by completely excluding some beans which are not used
in the fast normalization process
 - functions returning typical default values ({}, [], and null) are now
cached to avoid generating them multiple times and saving space in the
output of the bean extractor

close #1760

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 8, 2017

fix/feat #1760 fixes and improvements for beans pre-compilation
This commit contains a set of fixes and improvements linked to beans
pre-compilation, introduced in #1759:
 - the ATDebug flag when compiling beans is now removed because it also
caused all templates to be compiled in debug mode (with line numbers)
 - there are new checks in BeanExtractor to be sure that the configuration
in the JsonValidator is correct for the extraction with the given options
to be successful
 - an issue with default values which were not correctly normalized in non
debug mode is now fixed
 - the bean extractor now further improves the size of output files when
onlyFastNorm is used by completely excluding some beans which are not used
in the fast normalization process
 - functions returning typical default values ({}, [], and null) are now
cached to avoid generating them multiple times and to save space in the
output of the bean extractor

close #1760

divdavem added a commit to divdavem/ariatemplates that referenced this pull request Mar 8, 2017

feat #1760 fixes and improvements for beans pre-compilation
This commit contains a set of fixes and improvements linked to beans
pre-compilation, introduced in #1759:
 - the ATDebug flag when compiling beans is now removed because it also
caused all templates to be compiled in debug mode (with line numbers)
 - there are new checks in BeanExtractor to be sure that the configuration
in the JsonValidator is correct for the extraction with the given options
to be successful
 - an issue with default values which were not correctly normalized in non
debug mode is now fixed
 - the value returned by the generated $getDefault functions is no longer
fully normalized, but it is expanded in $fastNorm in order to reduce the
size of compiled beans
 - beans which are not used in the fast normalization process are now
discarded by the bean extractor when onlyFastNorm is true, in order to
reduce the size of the resulting file
 - functions returning typical default values ({}, [], and null) are now
cached to avoid generating them multiple times and to reduce the size of
compiled beans
 - the generated fast normalization functions now call the fast
normalization function generated for the parent bean when it is useful and
possible, in order to reduce the size of compiled beans

close #1760

@divdavem divdavem added this to the 1.8.3 milestone Mar 17, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment