Skip to content
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

Optimize date parsing #735

merged 3 commits into from May 29, 2017


Copy link

@rxaviers rxaviers commented May 26, 2017

Make runtime phase lighter. Move weight from runtime to setup phase.

Copy link
Member Author

rxaviers commented May 29, 2017

Size diff: (significant date size reduction)

   raw     gz Compared to master @ 5d1379688667684fa5754448130d468b4d253dcd    
     =      = tmp/globalize.min.js                                             
     =      = tmp/globalize/currency.min.js                                    
 -1099   -578 tmp/globalize/date.min.js                                        
     =      = tmp/globalize/message.min.js                                     
   +36     +9 tmp/globalize/number.min.js                                      
     =      = tmp/globalize/plural.min.js                                      
     =      = tmp/globalize/relative-time.min.js                               
     =      = tmp/globalize/unit.min.js                                        
     =      = tmp/globalize-runtime.min.js                                     
     =      = tmp/globalize-runtime/currency.min.js                            
 -2034   -881 tmp/globalize-runtime/date.min.js                                
     =      = tmp/globalize-runtime/message.min.js                             
     =      = tmp/globalize-runtime/number.min.js                              
     =      = tmp/globalize-runtime/plural.min.js                              
     =      = tmp/globalize-runtime/relative-time.min.js                       
     =      = tmp/globalize-runtime/unit.min.js  

Copy link
Member Author

rxaviers commented May 29, 2017

And smarter use of regular expressions, i.e., create necessary regular expression only and do it once.

@rxaviers rxaviers merged commit c2e998d into globalizejs:master May 29, 2017
@rxaviers rxaviers added this to the 1.3.0 milestone May 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

1 participant