- From: marc fawzi <marc.fawzi@gmail.com>
- Date: Thu, 5 Jun 2014 14:15:09 -0700
- To: public-webapps <public-webapps@w3.org>, Joshua Bell <jsbell@google.com>
- Message-ID: <CACioZiuZrVhLXGxYJQ3SVX=2Nm9aUokTGSC7R+GNG5TfUm5QsQ@mail.gmail.com>
Hi Joshua, IDB folks, I was about to wrap up work on a small app that uses IDB but to my absolute surprise it looks that the number of indexed values in a MultiEntry index is limited to 50. Maybe it's not meant to contain an infinite number but 50 seems small and arbitrary. Why not 4096? Performance? If so, why is it NOT mentioned in any of the IDB docs published by the browser vendors? Following from my previous example (posted to this list), "tags" is a multiEntry index defined like so: objectStore.createIndex("tags", "tags", {unique: false, multiEntry: true}) When I put in say 3000 tags as follows: var req = objectStore.add({tags: myTagsArray, someKey: someValue, etc: etc}) Only the first 50 elements of myTagsArray show up in the Keys column within the Chrome Web Console (under Resources-->IndexedDB--->tags) and it's not a display issue only: The cursor (shown below) cannot find any value beyond the initial 50 values in myTagsArray. This is despite the cursor.value.tags containing all 100+ values. var range = IDBKeyRange.only(tags[0], "prev") var cursor = index.openCursor(range) Is this by design? Anyway to get around it (or do it differently) ? and why is the limit of 50 on indexed values not mentioned in any of the docs? I bet I'm missing something... because I can't think of why someone would pick the number 50. Thanks, Marc
Received on Thursday, 5 June 2014 21:16:16 UTC