Slow indexing in firefox
robertpiosik opened this issue · comments
Describe the bug
I noticed indexing is about 2.5x slower in firefox. Is it a known issue? Is firefox just this much slower or something can be done on orama side?
To Reproduce
- Launch Firefox
- Run indexing of a large dataset
Expected behavior
Indexing times should be about the same in all modern browsers.
Environment Info
Ubuntu 22.04
Firefox 120
Chrome 119
Affected areas
Initialization, Data Insertion
Additional context
No response
Hi @rpiosi,
Orama works best on V8 and JSC-powered runtimes, as the optimizations are well-known and easier to manage. Is the problem related to insertion only? How is the document schema structured?
const schema = {
id: 'string',
title: 'string',
tag_ids: 'string[]',
sites: 'string[]',
sites_variants: 'string[]',
tags: 'string[]',
created_at: 'number',
updated_at: 'number',
visited_at: 'number',
is_archived: 'boolean',
is_unread: 'boolean',
stars: 'number',
} as const
Chrome: 4s
Firefox: 12s
22k records, unix dates are in a month precision (day precision makes inserts in chrome take as long as firefox, ~12s).
Alright, I believe the problem is with UNIX dates. We already experienced this in some cases, let me see what the team can do and I'll get back to you in this issue
Fixed in #428