Repository navigation
learn: retrospective learnings #1080
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
Open
oss-engineer-bot
wants to merge
1
commit into
main
Choose a base branch
from
ai/learning-distill-pr
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # Learning journal 2026-11-25 | ||
|
|
||
| ### 2026-11-25: Results and lifecycle — Keep peak memory flat in row-building fast paths: stream per-row values, chunk numpy tolist | ||
| **Context:** In PR #1078, `_convert_columnar_table` first collected every per-row value list and only then called `_create_rows`. A reviewer flagged the extra peak memory: 107 MB against 88 MB on main for a 200k x 4 table. Separately, walking a numpy object array one row at a time created a view per row, which cost more than the Row construction being removed. Calling `tolist()` on 1024-row chunks fixed the speed without raising peak memory. Calling `tolist()` on the whole array raised peak memory by about 14%. | ||
| **Rule:** When optimizing result-row conversion, pass a generator of per-row values instead of a materialized list, convert numpy object arrays with `tolist()` in bounded chunks instead of row-by-row views or one full `tolist()`, and report peak traced memory against main alongside timings. | ||
|
|
||
| ### 2026-11-25: Results and lifecycle — Prove fast-path object construction is equivalent to the public factory | ||
| **Context:** PR #1078 added `_create_rows`, which builds `Row` objects directly with `tuple.__new__` and a `__dict__` write, skipping `Row.__call__`, `__new__` and `__setattr__`. Its tests compare the result with `fields(*values)` for tuple, list, numpy, generator, short and empty inputs. They check type, value types, that `__fields__` is the same object, repr, asDict, attribute and key access, pickle bytes, that rows stay read-only, the exact ValueError message, and rows on both sides of the 1024-row chunk boundaries. | ||
| **Rule:** When a performance fast path bypasses a class's normal constructor, test it against the original factory across every input shape for type, repr, equality, pickle bytes, field identity, immutability, exact error messages and chunk-boundary row counts. |
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Low — L-0050 (#1079) has no source journal entry in the repo. Only journal/2026-11-25.md is present, and the 2026-11-18 journal exists for other lessons. Restore journal/2026-11-24.md, or drop L-0050 until its journal entry lands.
🔀 Found by Claude Opus 5.5 · confirmed by the judge