global.foo to set up a utility that’s used by both main and render.
A method on this utility returns about 6000 objects (pouchdb database records), each with a handful of nested variables.
The utility works fine, and the records are queried and returned very quickly. However, I run into a serious performance issue when I try to iterate through the objects and read a property on them. It takes about 4 seconds just to map through the results, referencing one property. Profiling seems to indicate that excessive calling of the
get descriptor (presumably added by Electron when bootstrapping shared globals) is the culprit.
Is there are more performant way to do this? Is there a way to prevent the descriptors from being added to every single property of every single object that’s returned by the query?