In my last diary entry I wrote about putting the requested note ids into url. I said that it’s likely not going to be a problem because ids are stored in the url part that’s not sent over HTTP therefore it doesn’t matter how long is this part, how many ids it contains. That was said about a typical output of neis-one.org note feeds for countries that contain updates dating back up to a week. For a busy country that’s usually a few hundred notes. Concatenated with single-character separators they result in a few thousand character string appended to a url.
Feeds are not the only way to get note ids from neis-one.org. In fact you may no even want to get notes from the feeds because of their one week age limit. There are regular html pages for each country too, one for all notes, another for open notes. They likely contain more notes than the feeds do. The open notes pages, which are of interest to someone who wants to resolve notes in a given country, can have up to ten thousand notes. I added options to open those with note-viewer, along with arbitrary html files. The last two options in the neis-one.org Get … notes for this country dropdown of the XML tab set up the selector (cells in second columns of tables from neis-one.org webpages) and open the webpage that you have to save to a file and then open that file with note-viewer. Unlike the xml feeds, even Firefox won’t start the download automatically.
Is note-viewer able to open ten thousand notes? Kind of. It won’t have to load all of them at once. There’s not even a way to load them at once. Like was said in my last diary entry, each note has to be downloaded with a separate request to the OSM API. That’s why the available batch sizes in note-viewer’s XML mode are so small. Even if there was an API call to fetch several notes at once, like the one for elements, it wouldn’t work for thousands of elements. In case of such hypothetical API call, the ids would have to be sent over HTTP, this is going to limit the request length. But let’s go back to urls generated by note-viewer that can supposedly be of any length. Will note-viewer generate a url with 10k note ids? Yes. We’re at seven-digit note ids now, plus one separator character between ids - that’ 80k characters! 80k characters in your browser’s location bar, will they fit there? Let’s find out:
Discussion