Conversation
added 30 commits
February 9, 2026 02:40
to_ics for ICalendar.Event was spending cycles being deterministic: it was sorting, flattening lists, and creating a final string ... all so it would produce deterministic output. this does make testing easier, but it also wastes cycles at runtime. adding deterministic order back if needed/desired is easy enough: add back an `Enum.sort` in `to_kvs`. This also skips processing empty fields for even less wastage.
these includes: * attachments * created * attendees * priority * transparency * duration * contacts * related_to * resources * rdates needs serialization support for some (e.g. attachments) and unit tests are missing
* serialize all fields, including the recently added ones * do not serialize into a string, but an iolist * ensure correct escaping of all values * add serializing helpers for dates, numbers, comma lists, strings, ... the serialization helpers can be refactored later into e.g. ICalendar.Serialize if/when TODOs, ALARMs, etc. are added which may also want to use these functions
support tabs or any number of spaces, custom separator character, only create a final string at the very end
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.