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

Spec Text Size Reductions: Tracking Ticket #2793

Closed
7 of 9 tasks
arshaw opened this issue Feb 29, 2024 · 3 comments
Closed
7 of 9 tasks

Spec Text Size Reductions: Tracking Ticket #2793

arshaw opened this issue Feb 29, 2024 · 3 comments
Labels

Comments

@arshaw
Copy link
Contributor

arshaw commented Feb 29, 2024

This ticket tracks progress for all other tickets meant to reduce the number of calls to user code repeated sections of the spec text. These are/will be implemented as merely PROOFS OF CONCEPT at first. The original goal of this was to improve runtime performance and reduce user code calls. Now the goal is to make the code more DRY for decreased proposal size and file size of compiled code in implementations.

Bugs

Tickets that BOTH require bugfixing AND will decrease # of user calls and reduce filesize when fixed:

Other DRY-ness

In addition to above, there are other ways to make the code more DRY:

@ptomato
Copy link
Collaborator

ptomato commented Apr 18, 2024

As of #2826, we are getting rid of user code calls, so let's change the focus of this to just DRY the spec algorithms. Once #2826 happens, these should all be editorial changes, so they are less urgent; we should get them incorporated before declaring the spec stable though.

@ptomato ptomato changed the title Fewer Calls & Size Reductions: Tracking Ticket Spec Text Size Reductions: Tracking Ticket Apr 18, 2024
@ptomato ptomato added this to the Stage "3.5" milestone Apr 18, 2024
@ptomato
Copy link
Collaborator

ptomato commented Sep 10, 2024

@arshaw Most of the items from this list are now done. It's just the two remaining ones under "Other DRY-ness" left.

"Unify code paths for YMD diffing" would currently not actually result in a spec text size reduction, because the calendar-dependent CalendarDateDifference is left as implementation-defined. Shrinking the size of the reference polyfill is quite low priority, since it's not used in production. So I'm inclined to just cross this one off the list.

(Note, there is an issue open to specify CalendarDateDifference in the Intl Era and Month Codes proposal. We could revisit this in the future, if it becomes feasible to specify DifferenceISODate in terms of CalendarDateDifference.)

"Options parsing for diffing rounding (roundingIncrement, roundingMode)" I'm not sure what to do with this one, but it sounds like you had a refactor in mind. Would you like to open a ticket for that with more details, and close this one?

@ptomato ptomato removed this from the Stage "3.5" milestone Sep 10, 2024
@arshaw
Copy link
Contributor Author

arshaw commented Sep 13, 2024

That's great news @ptomato. Looking at how to DRY-up roundingIncrement parsing (GetRoundingIncrementOption, MAX_DIFFERENCE_INCREMENTS , ValidateTemporalRoundingIncrement and the like), I'm realizing the DRY-ness works well in a JS polyfill but would be challenging to do in a statically typed language, so I rescind this!

@arshaw arshaw closed this as completed Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants