News for hackers. Stuff that matters.
Re:Show HN: Instant search of 200K+ SVG logos from 100 sources by the_duke on Sunday June 14, 2020 @02:07PM (#23519827)
Looks useful.

Feedback: the result rendering is very "jumpy" due to logos loading in one at a time.

You could either render sized wrapper containers for each logo, or load them in in the background and only show them once ready (with a loading indicator somewhere).

Re:Show HN: Instant search of 200K+ SVG logos from 100 sources by Fileformat on Sunday June 14, 2020 @04:00PM (#23520829)
I have tried various solutions, but nothing that works better than what's there now.

I only force the height for the logos, not the width, so wrapping doesn't really improve things.

Waiting to display until they are all loaded kills the "instant" tagline. I'm hotlinking the images, so some images can take awhile.

Re:Show HN: Instant search of 200K+ SVG logos from 100 sources by whoisjuan on Sunday June 14, 2020 @04:07PM (#23520862)
In theory you should be able to get the natural height and width of the image before loading it. Not exactly sure if it works with SVGs but it does work with PNGs
Re:Show HN: Instant search of 200K+ SVG logos from 100 sources by EmilStenstrom on Sunday June 14, 2020 @04:09PM (#23520882)
Yeah, you could get the size of the images at indexing time, and return that in the search result.
Re:Show HN: Instant search of 200K+ SVG logos from 100 sources by Fileformat on Sunday June 14, 2020 @04:20PM (#23520976)
You are assuming that I actually load the image at index time: I'm really only indexing the file name.

And getting the width/height of a minimized SVG requires rendering it (or at least more SVG mojo than I possess).

Re:Show HN: Instant search of 200K+ SVG logos from 100 sources by setr on Sunday June 14, 2020 @06:58PM (#23522141)
He's suggesting your index store the filename, height & width, and retrieve all 3 on search
Re:Show HN: Instant search of 200K+ SVG logos from 100 sources by Ayesh on Monday June 15, 2020 @02:32AM (#23524399)
You can use preconneft tags to make the browser preconneft to the likely source of the images. This usually gives a pretty big boost in speed because browsers will have already connected (DNS + TLS handshake) to the icon source's CDN.
Re:Show HN: Instant search of 200K+ SVG logos from 100 sources by AHASIC on Sunday June 14, 2020 @11:26PM (#23523473)
It's a non-issue, don't sweat it.