[Bug debuginfod/27983] ignore duplicate urls
Mon Jul 19 13:31:17 GMT 2021
On Wed, Jul 14, 2021 at 12:36 PM Mark Wielaard <email@example.com> wrote:
> You deduplicate the full URLs after they are fully constructed. Would
> it make sense to do the deduplication on server_url, maybe even as
> part of the Count number of URLs code? That might make the code
> simpler. And you can change num_urls upfront.
Deduplication before fully building the URL would work well, however I
was concerned about the slashbuildid situation. I would need to alter
all urls to either have a trailing '/' or no trailing '/' to ensure
comparison between 'http://127.0.0.1:8000/' and 'http://127.0.0.1:8000'
is considered equal. This is possible, but I ultimately decided to
wait until full construction as those issues would have been handled.
I would be glad to make the change if you want.
> > + num_urls = unduplicated_urls;
> > + data = reallocarray( (void *) data, num_urls, sizeof(struct handle_data));
> Maybe this reallocarray is unnecessary. Yes, it might save a little
> bit of memory, but you do have to handle reallocarray failure.
Good to know. I removed it.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6339 bytes
Desc: not available
More information about the Elfutils-devel