10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-07-23 11:17:42 +02:00

Performance improvement

This commit is contained in:
Mickaël Véril 2020-08-24 12:35:05 +02:00
parent 62acffa870
commit a44813e2d1

View File

@ -211,9 +211,14 @@ draft: false
var selects = getAllSelectBefore(name, true)
var currentselect = selects.last()
selects = selects.slice(0, selects.length - 1)
var AllValsCache = new Map()
selects.each(function() {
AllValsCache.set(this.name,getAllVals(this))
})
var AAllValsCache = Array.from(AllValsCache)
var vals = uniq(window.dats.filter(d => {
return Array.from(selects).every((el) => {
return getAllVals(el).includes(getSelectValue(d, el.name))
return AAllValsCache.every(([k,v]) => {
return v.indexOf(getSelectValue(d, k)) !== -1
})
}).map((d) => getSelectValue(d, name)))
const publis = await (async () => {