Issue #662Opened December 20, 2017by mingodad0 reactions

Small performance issue on storage manager

Question

Hello ! On storage manager "load(keys, clb)" there is an unnecessary Regular expression creation inside a loop that don't need to be there.

Here is the fixed code.

      st && st.load(keysF, res => {
        // Restore keys name
        var reg = new RegExp('^' + c.id + ''); ///////// <<< This originally was inside the next for loop 
        for (var itemKey in res) {
          var itemKeyR = itemKey.replace(reg, '');
          result[itemKeyR] = res[itemKey];
        }

Cheers !

Answers (1)

lock[bot]September 18, 20190 reactions

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.