I have a data entry input form with (invoice + details) that are added dinamically. For the product search I've created an input linked to a datalist with options. Whenever the user types, it filters a big array of products with JS and then replaces the contents of the linked datalist with the constructed options, so it's updates the suggestions (it's like jQuery autocomplete but all native). So far, so good.

Now, when I keep adding details to the invoice, the performance of the search operation starts to degrade.. (Version 59.0.3071.115 (Official Build) (64-bit) on MacOsX and Windows). I've started to profile stuff, and I nailed the problem to the line that sets up the innerHTML of the datalist:

updateDatalist: (filter = '') => options = @buildOptions(@filterWith(filter)) console.time 'updateDatalist' @$datalist[0].innerHTML = options console.timeEnd 'updateDatalist'

The performance timer starts reporting ~30ms when there is only one detail, and then it scales to 500-700ms when there are 10 aprox. I've been profiling, guessing that there should be something wrong with my setup but nothing. Then I try it with Firefox and, wala, it works perfect always and performance never degrades.

Do you think it's a bug or I'm missing something? Should I report it and how?

EDIT: Here is a complete gist of the source: https://gist.github.com/vizcay/969f2b492630b12a520adb6e7433628e