Navigation Menu

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

WIP: Refactor validation helpers into a single module #445

Closed
wants to merge 3 commits into from

Conversation

jzaefferer
Copy link
Contributor

Fixes #362

I made the functional changes, but can get past jshint:dist. Apparently the build system isn't able to handle this module type. onBuildWrite is kinda complicated, so I'm hoping for some help to debug this. Once it actually builds, we should get some numbers from the compare_size task.

I definitely like the raw reduction in LOCs, currently 291 additions and 456 deletions. Less dependencies and factory arguments is nice.

@rxaviers
Copy link
Member

rxaviers commented May 7, 2015

The outcome of this change is:

Minified size size 𝛥 Minified+gz size size 𝛥
globalize.min.js 3906 53.18% 1672 33.23%
globalize/currency.min.js 5751 -3.68% 2469 -5.44%
globalize/date.min.js 15243 0.07% 4959 -0.74%
globalize/message.min.js 15892 -3.60% 4920 -4.84%
globalize/number.min.js 7226 -0.17% 2965 -1.66%
globalize/plural.min.js 5270 -2.68% 2231 -1.76%
globalize/relative-time.min.js 1468 0.69% 697 -1.55%

The whole purpose of keeping each validation separately is being able to balance the weight, i.e., only including them when necessary. In other words, currently no unnecessary validation is loaded. After the change, it is.

Having said that, I'm mostly concerned/interested in seem the delta difference in the runtime modules (#398). Because, they use even less validations, therefore the impact will be bigger.

@jzaefferer
Copy link
Contributor Author

What do these numbers mean?

@rxaviers
Copy link
Member

rxaviers commented May 7, 2015

The size of final modules.

@jzaefferer
Copy link
Contributor Author

Specifically, how can I read the percentages?

@rxaviers
Copy link
Member

rxaviers commented May 7, 2015

Delta sizes (comparing master with this PR)

@jzaefferer
Copy link
Contributor Author

So the main module gets bigger, the others get smaller?

Doing the comparison on top of the runtime changes seems reasonable.

@rxaviers
Copy link
Member

So the main module gets bigger, the others get smaller?

yeap

@rxaviers
Copy link
Member

I am closing all old (and stalled) PRs

@rxaviers rxaviers closed this Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validation (internal code): evaluate a single entrypoint API
4 participants