gcavallo / chrome-geoflag

Chrome extension which shows a flag based on the current website's server location.
GNU General Public License v3.0
0 stars 0 forks source link

Test IndexedDB for potential performance gain #3

Open gcavallo opened 8 years ago

gcavallo commented 8 years ago

I need to learn this first, benchmark performance between json and IndexedDB, document it, and implement the fastest one. I'm open to other alternatives, but it must be local (no 3rd party API like the other extensions.)

Links:

gcavallo commented 8 years ago

The MaxMind binary database could also be worth benchmarking.

jacobgelling commented 8 years ago

Yep, I've have tested IndexedDB in the past (see my IndexedDB branch) and it seemed to be considerably faster, especially on non-SSD computers due to the JSON queries being IO-bound.

It's been ages since I've spent time on it, but I believe I never got a optimised IPv6 implementation for IndexedDB working (due to the decimal representation of a IPv6 address being longer than JS could handle), and there was a long initial install time as the database had to get populated from file first.

gcavallo commented 8 years ago

I'm also curious about the geolite2 "binary" format, there's node libraries to query them. I want to try a few different backends and document a benchmark. So we'll find out if there's a way to make a decent IPv6 query without an external API. It's quite a challenge as that IPv6 database will grow over the next few years.