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
Take subscription lists as they come: 200k lines, and .txt everywhere (#134)
Three things stopped a hundred-and-ten-thousand-line list of feeds from
being an ordinary thing to submit.
The cap that was read as one was never a cap on a submission at all.
RAW_INPUT_LINE_LIMIT bounds the copy of an upload kept to name it on its
status page — the ceiling on a submission is MAX_UPLOAD_FEEDS and it is
in the tens of millions — but "only the first 50,000 lines of the upload
are kept" reads as a limit however it is meant, and fifty thousand is
below the size of the lists people actually bring. Raised to 200,000, so
a real export is recorded whole and the note is one almost nobody sees.
A plain list of feed URLs uploaded as a file was silently thrown away by
every client that is not our uploader. The field is named `opml` and the
endpoint took the name for the truth, so a .txt of one feed per line was
parsed as XML, matched no outlines, and came back `no-feeds-in-opml`
having imported nothing — with JavaScript off, from curl, or from an
agent. It is sniffed now, by the same call the browser has always made.
sniffKind reads the file before the name while it is here: `<opml` in
the head means OPML whatever the file is called, which is the case its
own comment promised and the old order lost.
And a large submission arriving in one piece was crawled inside the
request that carried it — importFeeds reads every feed URL and slug in
the directory, then a round trip per five hundred rows, which for a
hundred and eight thousand entries is over two hundred of them under a
five-minute ceiling. Past five thousand entries it is staged instead and
released to the poller, exactly as the batched uploader stages it: one
bulk insert per two thousand, nothing that scales with the directory.
Measured on that file: 1.0s to hand over, all 108,000 recorded. Below
the threshold nothing changes, and one URL still redirects to the blog
it just added.
Two things the staged path exposed once everything took it:
- The progress bar counted only queued feeds, so the whole handover —
now most of a large import's life — showed a full bar and the word
"finished" under a heading saying "Import in progress". Staged entries
count towards the total in both the page and the stream, and the tick
interval is sized from them too, which had put the biggest uploads on
the fastest poll.
- The uploader switched its progress panel on the sniffed kind, so a
.txt chosen in the file form drew its bar under the paste box. It
switches on which form started it now.
Verified end to end against a 108,000-line, 5.4 MB file: staged in 1.0s
over multipart, 2.3s in the browser (54 batches), 50,000 feeds drained
in 6.1s, unique slugs throughout, and OPML — including OPML living in a
.txt — still read as OPML with its titles and entities intact.
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments