HTML Preparation code:
AخA
 
1
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
Script Preparation code:
 
window.foo = {
  "@components": {
    "actions": {
      "@id": "http://localhost:55001/plone/@actions"
    }, 
    "breadcrumbs": {
      "@id": "http://localhost:55001/plone/@breadcrumbs"
    }, 
    "navigation": {
      "@id": "http://localhost:55001/plone/@navigation"
    }
  }, 
  "@id": "http://localhost:55001/plone/", 
  "@type": "Plone Site", 
  "blocks": {
    "0358abe2-b4f1-463d-a279-a63ea80daf19": {
      "@type": "description"
    }, 
    "07c273fc-8bfc-4e7d-a327-d513e5a945bb": {
      "@type": "title"
    }, 
    "2dfe8e4c-5bf6-43f1-93e1-6c320ede7226": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [
              {
                "length": 10, 
                "offset": 0, 
                "style": "BOLD"
              }
            ], 
            "key": "6470b", 
            "text": "Disclaimer: This instance is reset every night, so all changes will be lost afterwards.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "3c881f51-f75b-4959-834a-6e1d5edc32ae": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [
              {
                "length": 5, 
                "offset": 6, 
                "style": "BOLD"
              }
            ], 
            "key": "ekn3l", 
            "text": "user: admin", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "5e1c30b1-ec6c-4dc0-9483-9768c3c416e4": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [
              {
                "key": 0, 
                "length": 5, 
                "offset": 0
              }, 
              {
                "key": 1, 
                "length": 8, 
                "offset": 455
              }
            ], 
            "inlineStyleRanges": [], 
            "key": "behki", 
            "text": "Plone is a CMS built on Python with over 19 years of experience. Plone has very interesting features that appeal to developers and users alike, such as customizable content types, hierarchical URL object traversing and a sophisticated content workflow powered by a granular permissions model. This allows you to build anything from simple websites to enterprise-grade intranets. Volto exposes all these features and communicates with Plone via its mature REST API. Volto can be esily themed and is highly customizable.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {
          "0": {
            "data": {
              "href": "https://plone.org", 
              "rel": "nofollow", 
              "url": "https://plone.org/"
            }, 
            "mutability": "MUTABLE", 
            "type": "LINK"
          }, 
          "1": {
            "data": {
              "href": "https://github.com/plone/plone.restapi", 
              "url": "https://github.com/plone/plone.restapi"
            }, 
            "mutability": "MUTABLE", 
            "type": "LINK"
          }
        }
      }
    }, 
    "61cc1bc0-d4f5-4e2b-9152-79512045a4dd": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [], 
            "key": "9qsa4", 
            "text": "Demo", 
            "type": "header-two"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "874049e7-629e-489a-b46c-1adf35ad40ee": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [], 
            "key": "9pnjr", 
            "text": "Happy hacking!", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "942b6530-2407-420f-9c24-597adda6b2ce": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [
              {
                "key": 0, 
                "length": 36, 
                "offset": 39
              }
            ], 
            "inlineStyleRanges": [], 
            "key": "6a248", 
            "text": "Last but not least, it also supports a Volto Nodejs-based backend reference API implementation that demos how other systems could also use Volto to display and create content through it.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {
          "0": {
            "data": {
              "href": "https://github.com/plone/volto-reference-backend", 
              "url": "https://github.com/plone/volto-reference-backend"
            }, 
            "mutability": "MUTABLE", 
            "type": "LINK"
          }
        }
      }
    }, 
    "9a976b8e-72ba-468a-bea8-b37a31bb386b": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [
              {
                "length": 12, 
                "offset": 51, 
                "style": "BOLD"
              }
            ], 
            "key": "94arl", 
            "text": "You can log in and use it as admin user using these credentials:", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "b3717238-448f-406e-b06f-57a9715c3326": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [
              {
                "key": 0, 
                "length": 5, 
                "offset": 0
              }
            ], 
            "inlineStyleRanges": [], 
            "key": "1bnna", 
            "text": "Volto is a React-based frontend for content management systems, currently supporting three backend implementations: Plone, Guillotina and a NodeJS reference implementation.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {
          "0": {
            "data": {
              "href": "https://github.com/plone/volto", 
              "url": "https://github.com/plone/volto"
            }, 
            "mutability": "MUTABLE", 
            "type": "LINK"
          }
        }
      }
    }, 
    "c049ff8b-3e5a-4cfb-bca6-e4a6cca9be28": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [], 
            "key": "55n44", 
            "text": "You can use this site to test Volto. It runs on the master branch of Volto using latest Plone 5.2 Backend running on Python 3.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "c91f0fe9-f2e9-4a17-84a5-8e4f2678ed3c": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [
              {
                "length": 5, 
                "offset": 10, 
                "style": "BOLD"
              }
            ], 
            "key": "buncq", 
            "text": "password: admin", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "e0ca2fbc-7800-4b9b-afe5-8e42af9f5dd6": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [], 
            "key": "f0prj", 
            "text": "2020 - Volto Team - Plone Foundation", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "effbdcdc-253c-41a7-841e-5edb3b56ce32": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [
              {
                "key": 0, 
                "length": 10, 
                "offset": 36
              }
            ], 
            "inlineStyleRanges": [], 
            "key": "68rve", 
            "text": "Volto also supports other APIs like Guillotina, a Python resource management system, inspired by Plone and using the same basic concepts like traversal, content types and permissions model.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {
          "0": {
            "data": {
              "href": "https://guillotina.io/", 
              "rel": "nofollow", 
              "url": "https://guillotina.io/"
            }, 
            "mutability": "MUTABLE", 
            "type": "LINK"
          }
        }
      }
    }
  }, 
  "blocks_layout": {
    "items": [
      "07c273fc-8bfc-4e7d-a327-d513e5a945bb", 
      "0358abe2-b4f1-463d-a279-a63ea80daf19", 
      "b3717238-448f-406e-b06f-57a9715c3326", 
      "5e1c30b1-ec6c-4dc0-9483-9768c3c416e4", 
      "effbdcdc-253c-41a7-841e-5edb3b56ce32", 
      "942b6530-2407-420f-9c24-597adda6b2ce", 
      "61cc1bc0-d4f5-4e2b-9152-79512045a4dd", 
      "c049ff8b-3e5a-4cfb-bca6-e4a6cca9be28", 
      "9a976b8e-72ba-468a-bea8-b37a31bb386b", 
      "3c881f51-f75b-4959-834a-6e1d5edc32ae", 
      "c91f0fe9-f2e9-4a17-84a5-8e4f2678ed3c", 
      "2dfe8e4c-5bf6-43f1-93e1-6c320ede7226", 
      "874049e7-629e-489a-b46c-1adf35ad40ee", 
      "e0ca2fbc-7800-4b9b-afe5-8e42af9f5dd6"
    ]
  }, 
  "description": "The React powered content management system", 
  "id": "plone", 
  "is_folderish": true, 
  "items": [
    {
      "@id": "http://localhost:55001/plone/front-page", 
      "@type": "Document", 
      "description": "Congratulations! You have successfully installed Plone.", 
      "review_state": "published", 
      "title": "Welcome to Plone"
    }, 
    {
      "@id": "http://localhost:55001/plone/columns-test", 
      "@type": "Document", 
      "description": "", 
      "review_state": "private", 
      "title": "Columns test"
    }
  ], 
  "items_total": 2, 
  "parent": {}, 
  "title": "Welcome to Volto!"
};
window.bar = {
  "@components": {
    "actions": {
      "@id": "http://localhost:55001/plone/@actions"
    }, 
    "breadcrumbs": {
      "@id": "http://localhost:55001/plone/@breadcrumbs"
    }, 
    "navigation": {
      "@id": "http://localhost:55001/plone/@navigation"
    }
  }, 
  "@id": "http://localhost:55001/plone/", 
  "@type": "Plone Site", 
  "blocks": {
    "0358abe2-b4f1-463d-a279-a63ea80daf19": {
      "@type": "description"
    }, 
    "07c273fc-8bfc-4e7d-a327-d513e5a945bb": {
      "@type": "title"
    }, 
    "2dfe8e4c-5bf6-43f1-93e1-6c320ede7226": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [
              {
                "length": 10, 
                "offset": 0, 
                "style": "BOLD"
              }
            ], 
            "key": "6470b", 
            "text": "Disclaimer: This instance is reset every night, so all changes will be lost afterwards.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "3c881f51-f75b-4959-834a-6e1d5edc32ae": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [
              {
                "length": 5, 
                "offset": 6, 
                "style": "BOLD"
              }
            ], 
            "key": "ekn3l", 
            "text": "user: admin", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "5e1c30b1-ec6c-4dc0-9483-9768c3c416e4": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [
              {
                "key": 0, 
                "length": 5, 
                "offset": 0
              }, 
              {
                "key": 1, 
                "length": 8, 
                "offset": 455
              }
            ], 
            "inlineStyleRanges": [], 
            "key": "behki", 
            "text": "Plone is a CMS built on Python with over 19 years of experience. Plone has very interesting features that appeal to developers and users alike, such as customizable content types, hierarchical URL object traversing and a sophisticated content workflow powered by a granular permissions model. This allows you to build anything from simple websites to enterprise-grade intranets. Volto exposes all these features and communicates with Plone via its mature REST API. Volto can be esily themed and is highly customizable.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {
          "0": {
            "data": {
              "href": "https://plone.org", 
              "rel": "nofollow", 
              "url": "https://plone.org/"
            }, 
            "mutability": "MUTABLE", 
            "type": "LINK"
          }, 
          "1": {
            "data": {
              "href": "https://github.com/plone/plone.restapi", 
              "url": "https://github.com/plone/plone.restapi"
            }, 
            "mutability": "MUTABLE", 
            "type": "LINK"
          }
        }
      }
    }, 
    "61cc1bc0-d4f5-4e2b-9152-79512045a4dd": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [], 
            "key": "9qsa4", 
            "text": "Demo", 
            "type": "header-two"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "874049e7-629e-489a-b46c-1adf35ad40ee": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [], 
            "key": "9pnjr", 
            "text": "Happy hacking!", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "942b6530-2407-420f-9c24-597adda6b2ce": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [
              {
                "key": 0, 
                "length": 36, 
                "offset": 39
              }
            ], 
            "inlineStyleRanges": [], 
            "key": "6a248", 
            "text": "Last but not least, it also supports a Volto Nodejs-based backend reference API implementation that demos how other systems could also use Volto to display and create content through it.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {
          "0": {
            "data": {
              "href": "https://github.com/plone/volto-reference-backend", 
              "url": "https://github.com/plone/volto-reference-backend"
            }, 
            "mutability": "MUTABLE", 
            "type": "LINK"
          }
        }
      }
    }, 
    "9a976b8e-72ba-468a-bea8-b37a31bb386b": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [
              {
                "length": 12, 
                "offset": 51, 
                "style": "BOLD"
              }
            ], 
            "key": "94arl", 
            "text": "You can log in and use it as admin user using these credentials:", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "b3717238-448f-406e-b06f-57a9715c3326": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [
              {
                "key": 0, 
                "length": 5, 
                "offset": 0
              }
            ], 
            "inlineStyleRanges": [], 
            "key": "1bnna", 
            "text": "Volto is a React-based frontend for content management systems, currently supporting three backend implementations: Plone, Guillotina and a NodeJS reference implementation.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {
          "0": {
            "data": {
              "href": "https://github.com/plone/volto", 
              "url": "https://github.com/plone/volto"
            }, 
            "mutability": "MUTABLE", 
            "type": "LINK"
          }
        }
      }
    }, 
    "c049ff8b-3e5a-4cfb-bca6-e4a6cca9be28": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [], 
            "key": "55n44", 
            "text": "You can use this site to test Volto. It runs on the master branch of Volto using latest Plone 5.2 Backend running on Python 3.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "c91f0fe9-f2e9-4a17-84a5-8e4f2678ed3c": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [
              {
                "length": 5, 
                "offset": 10, 
                "style": "BOLD"
              }
            ], 
            "key": "buncq", 
            "text": "password: admin", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "e0ca2fbc-7800-4b9b-afe5-8e42af9f5dd6": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [], 
            "inlineStyleRanges": [], 
            "key": "f0prj", 
            "text": "2020 - Volto Team - Plone Foundation", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {}
      }
    }, 
    "effbdcdc-253c-41a7-841e-5edb3b56ce32": {
      "@type": "text", 
      "text": {
        "blocks": [
          {
            "data": {}, 
            "depth": 0, 
            "entityRanges": [
              {
                "key": 0, 
                "length": 10, 
                "offset": 36
              }
            ], 
            "inlineStyleRanges": [], 
            "key": "68rve", 
            "text": "Volto also supports other APIs like Guillotina, a Python resource management system, inspired by Plone and using the same basic concepts like traversal, content types and permissions model.", 
            "type": "unstyled"
          }
        ], 
        "entityMap": {
          "0": {
            "data": {
              "href": "https://guillotina.io/", 
              "rel": "nofollow", 
              "url": "https://guillotina.io/"
            }, 
            "mutability": "MUTABLE", 
            "type": "LINK"
          }
        }
      }
    }
  }, 
  "blocks_layout": {
    "items": [
      "07c273fc-8bfc-4e7d-a327-d513e5a945bb", 
      "0358abe2-b4f1-463d-a279-a63ea80daf19", 
      "b3717238-448f-406e-b06f-57a9715c3326", 
      "5e1c30b1-ec6c-4dc0-9483-9768c3c416e4", 
      "effbdcdc-253c-41a7-841e-5edb3b56ce32", 
      "942b6530-2407-420f-9c24-597adda6b2ce", 
      "61cc1bc0-d4f5-4e2b-9152-79512045a4dd", 
      "c049ff8b-3e5a-4cfb-bca6-e4a6cca9be28", 
      "9a976b8e-72ba-468a-bea8-b37a31bb386b", 
      "3c881f51-f75b-4959-834a-6e1d5edc32ae", 
      "c91f0fe9-f2e9-4a17-84a5-8e4f2678ed3c", 
      "2dfe8e4c-5bf6-43f1-93e1-6c320ede7226", 
      "874049e7-629e-489a-b46c-1adf35ad40ee", 
      "e0ca2fbc-7800-4b9b-afe5-8e42af9f5dd6"
    ]
  }, 
  "description": "The React powered content management system", 
  "id": "plone", 
  "is_folderish": true, 
  "items": [
    {
      "@id": "http://localhost:55001/plone/front-page", 
      "@type": "Document", 
      "description": "Congratulations! You have successfully installed Plone.", 
      "review_state": "published", 
      "title": "Welcome to Plone"
    }, 
    {
      "@id": "http://localhost:55001/plone/columns-test", 
      "@type": "Document", 
      "description": "", 
      "review_state": "private", 
      "title": "Columns test"
    }
  ], 
  "items_total": 2, 
  "parent": {}, 
  "title": "Welcome to Volto!"
};
Tests:
  • _.isEqual

     
    _.isEqual(window.foo, window.bar)
  • JSON.stringify

     
    JSON.stringify(window.foo) === JSON.stringify(window.bar);
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    _.isEqual
    JSON.stringify

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36
Chrome 86 on Windows
View result in a separate tab
Test name Executions per second
_.isEqual 9250.5 Ops/sec
JSON.stringify 17113.2 Ops/sec