Skip to content

only initialize the selected advent days#11

Open
romikabi wants to merge 1 commit intoswiftlang:mainfrom
romikabi:rome/avoid-reading-all-the-datas
Open

only initialize the selected advent days#11
romikabi wants to merge 1 commit intoswiftlang:mainfrom
romikabi:rome/avoid-reading-all-the-datas

Conversation

@romikabi
Copy link
Copy Markdown

@romikabi romikabi commented Dec 5, 2025

Currently all AdventDay implementations are instantiated right away in the allChallenges declaration, and AdventDay.init() reads the file from Sources/Data, so we read all datas on every run (and crash if any of them is missing).

This PR changes this to only operate with the types themselves until we actually need to instantiate and run them. This way we only read the data for the selected day.

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.

1 participant