You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
preset: a set asks each format for its smallest size once, and plans one file once (#132)
* guard: every preset's expansion is pinned, not only size-boundaries
TestEjectingAPresetGivesTheBytesItAlwaysGave pinned one case of one
preset. The next change is to how upload-validation, tabular-import,
text-encoding and empty-and-minimal work their sets out, and none of their
bytes had a guard. Nineteen cases now, measured on the tree before that
change: every preset, other formats in allow, and three refusals whose
words carry a format's smallest size.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* preset: a set asks each format for its smallest size once, and plans one file once
Expanding upload-validation took 137-142 ms and 57 MB, tabular-import 16-31
ms and 39 MB, every time a value changed - in the window, on every key typed
into a preset's setting or into the batch screen with a base.
The profile named the cause. A format's smallest size is found by planning it
at growing sizes, which for a picture is encoding one, and the presets asked
it afresh: sampleFor once for every file about a name or an insides - the
same question format.SmallestWithLabel already remembers - and setFile.bytes,
the boundary set and the encoding set with settings or a seed, which nothing
remembered. And upload-validation plans the same small picture under a dozen
names, one encoding per name.
- sampleFor asks format.SmallestWithLabel.
- format.SmallestRemembered keeps SmallestAccepted by format and request, at
most 4096 answers. SmallestWithLabel is that with the label on.
- format.RequestKey writes a request as text no other request shares, with
the values quoted so that a delimiter of "|" cannot join two settings.
- uploadSet.reachable skips a file whose question it has already asked. The
same request gets the same refusal and need, and the deepest shortfall
keeps the first file that reached it, so no answer moves.
The bytes of all nineteen pinned expansions and the words of three refusals
are the same as before. A changed value now allocates 9.6 MB and takes 20-36
ms for upload-validation, 19.8 MB for tabular-import.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* guard: a new value asks each question of a preset's set once, and a request's key holds every field
TestANewUploadLimitDoesNotAskTheSameQuestionsAgain and
TestANewRowCountWorksTheSheetsSmallestSizeOutOnce hold the allocation of an
expansion at a value the process has not seen, least of five, with the line
between what was measured with the answers remembered and without. Each
first asks that the set still holds what it is about - files asking one
question under several names, a sheet at its floor.
TestEveryFieldOfARequestIsInItsKey sets every field of format.Request in
turn by reflection and wants a key of its own, and wants a value holding a
space and an equals sign kept apart from two settings.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* preset: the question already asked is told apart in a function of its own, so reachable stays two deep
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* changelog: changing a setting of a preset is about four times faster
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
{id: "size-boundaries", args: preset.Args{"format": "png", "limit": "1mb"}, refused: "the preset size-boundaries cannot build this set - under_1mb would be 0 B, and a file cannot be smaller than nothing. Raise the limit above 1048650 B, narrow the spread, or choose a format with a smaller minimum. The limit asked for was 1048576 B."},
{id: "size-boundaries", args: preset.Args{"format": "jpg", "limit": "300", "spread": "100"}, refused: "the preset size-boundaries cannot build this set - under_100 would be 200 B and the smallest JPG this build makes is 602 B. Raise the limit above 702 B, narrow the spread, or choose a format with a smaller minimum. The limit asked for was 300 B."},
{id: "upload-validation", args: preset.Args{"limit": "3kb"}, refused: "the preset upload-validation cannot build this set - allowed_pdf would be 1536 B and the smallest PDF this build makes is 3415 B. Raise the limit to 6830 B or more, or take pdf out of the allowed types. The limit asked for was 3072 B."},
0 commit comments