Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
JSON.stringify vs structuredClone big object
(version: 1)
JSON.stringify vs structuredClone
Comparing performance of:
JSON.stringify vs structuredClone
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
var MyObject = { builderVersion: '0.24.0', enabledFeatures: {}, gjsState: { projectData: { assets: [], dataSources: [], pages: [ { frames: [ { component: { attributes: { id: 'iakn', }, components: [ { attributes: { id: 'iq2d', }, classes: ['pwb-background', 'pwb-flex-grid-wrap'], components: [ { attributes: { id: 'iz8i', }, classes: ['pwb-scene'], style: '', type: 'scene', }, ], style: '', type: 'background', }, ], docEl: { tagName: 'html', }, head: { type: 'head', }, stylable: [ 'background', 'background-color', 'background-image', 'background-repeat', 'background-attachment', 'background-position', 'background-size', ], style: '', type: 'wrapper', }, id: '603JmnoLjop4EVaI', }, ], id: '209c05a3-1a41-4d7e-a511-f4cafe9162b7', name: 'Home', }, { frames: [ { component: { attributes: { id: 'pwb-loading-wrap', }, components: [ { attributes: { id: 'ista7', }, classes: ['pwb-flex-grid-wrap'], components: [ { attributes: { backgroundColor: '#38363B', backgroundWidth: 1, id: 'ih6tg', progressColor: '#FFFFFF', progressWidth: 3, size: 40, }, classes: ['pwb-loading-bar'], components: [ { attributes: { height: 86, id: 'ifik4', version: '1.1', viewPort: '0 0 86 86', width: 86, xmlns: 'http://www.w3.org/2000/svg', }, components: [ { attributes: { cx: 43, cy: 43, fill: 'transparent', id: 'itnr4', r: 40, stroke: '#38363B', 'stroke-dasharray': 251.32741228718345, 'stroke-dashoffset': '0', 'stroke-width': 1, }, resizable: { ratioDefault: true, }, tagName: 'circle', type: 'svg-in', }, { attributes: { cx: 43, cy: 43, fill: 'transparent', id: 'ij2wg', r: 40, stroke: '#FFFFFF', 'stroke-dasharray': 251.32741228718345, 'stroke-dashoffset': 12.566370614359172, 'stroke-width': 3, }, classes: ['pwb-loading-bar-circle'], resizable: { ratioDefault: true, }, tagName: 'circle', type: 'svg-in', }, ], hoverable: false, layerable: false, resizable: { ratioDefault: true, }, selectable: false, type: 'svg', }, { attributes: { id: 'i2314', }, classes: ['pwb-loading-bar-text'], components: [ { attributes: { id: 'iht0f', }, content: '95%', editable: false, type: 'textnode', }, ], draggable: false, name: 'Percentages', removable: false, styleable: ['font'], type: 'text', }, ], style: '', type: 'loadingBar', }, ], name: 'Wrapper', style: '', type: 'block', }, { attributes: { id: 'pwb-loading-page-logo', src: 'https://files.development.peachworlds.com/static/built_with_peach_worlds_light.png', }, name: 'PW Image', resizable: { ratioDefault: 1, }, style: '', styleable: [], type: 'image', }, ], docEl: { tagName: 'html', }, head: { type: 'head', }, stylable: [ 'background', 'background-color', 'background-image', 'background-repeat', 'background-attachment', 'background-position', 'background-size', ], style: '', type: 'wrapper', }, id: 'WzbFgXwnAFokPrW5', }, ], id: 'loadingPage', name: 'Loading Page', }, ], styles: [ { selectors: [], selectorsAdd: '*', style: { 'scrollbar-width': 'none', }, }, { selectors: [], selectorsAdd: '::-webkit-scrollbar', style: { display: 'none', }, }, { selectors: ['pwb-scene'], style: { display: 'none', }, }, { selectors: [], selectorsAdd: '.pwb-scene > canvas', style: { display: 'block', height: '100%', 'pointer-events': 'none', 'user-select': 'none', width: '100%', }, }, { selectors: ['#pwb-loading-wrap'], style: { 'background-color': '#06040A', }, }, { selectors: ['#ista7'], style: { 'align-items': 'center', display: 'flex', height: '100dvh', 'justify-content': 'center', position: 'relative', width: '100%', }, }, { selectors: ['#ih6tg'], style: { 'align-items': 'center', display: 'flex', 'justify-content': 'center', position: 'relative', }, }, { selectors: ['#i2314'], style: { color: '#FFFFFF', display: 'block', 'font-family': 'Inter', 'font-size': '18px', 'font-weight': 'bold', position: 'absolute', 'text-align': 'center', }, }, { selectors: ['#pwb-loading-page-logo'], style: { bottom: 0, 'object-fit': 'scale-down', padding: '0 12px 12px 12px', position: 'fixed', width: '100%', 'z-index': 1000, }, }, { selectors: ['#iakn'], style: { 'background-color': '#ffffff', position: 'relative', 'z-index': 0, }, }, { selectors: ['#iq2d'], style: { bottom: '0px', display: 'block', height: '100vh', left: '0px', position: 'fixed', right: '0px', top: '0px', width: '100vw', 'z-index': -1, }, }, { selectors: ['#iz8i'], style: { display: 'block', height: '100%', 'min-height': '75px', width: '100%', }, }, ], symbols: [], }, }, initialBuilderVersion: '0.24.0', migrationVersion: '0.23.1', pwState: { builderHistoricState: { activePageId: '209c05a3-1a41-4d7e-a511-f4cafe9162b7', activeSceneId: '7287c131-2d20-4942-871d-93e853854ed1', description: 'Made in PeachWeb', seoSettings: {}, title: 'My New Website', }, builderStaticState: { config: { animationTimelineAutoKeyframingOn: true, animationTimelinePosition: 0.29927584013108866, animationTimelineZoom: 0.1, panelSizes: {}, showGrid: true, showHelpers: true, showWireframes: false, }, }, pages: { '209c05a3-1a41-4d7e-a511-f4cafe9162b7': { path: '/', seoSettings: {}, title: 'Home', uiState: { devices: { desktop: {}, mobile: {}, tablet: {}, }, }, uuid: '209c05a3-1a41-4d7e-a511-f4cafe9162b7', }, loadingPage: { path: '', seoSettings: {}, title: 'Loading Page', uiState: { devices: { desktop: {}, mobile: {}, tablet: {}, }, }, uuid: 'loadingPage', }, }, scenes: { '7287c131-2d20-4942-871d-93e853854ed1': { animations: { sheetsById: { DEFAULT_ANIMATION_SHEET_NAME: { sequence: { frames: 1000, length: 1, lengthInUnits: 100, tracksByObject: { '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6': { trackData: { '2QyuaCOpyh': { __debugName: '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { lmshkTXWCw: true, }, byId: { lmshkTXWCw: { connectedRight: true, handles: [1, 1, 0, 0], id: 'lmshkTXWCw', position: 0.2040345076296982, value: -2.5438261695516258, }, }, }, type: 'BasicKeyframedTrack', }, '7bIbAIlu0z': { __debugName: '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { '5dCPpADvmw': true, }, byId: { '5dCPpADvmw': { connectedRight: true, handles: [1, 1, 0, 0], id: '5dCPpADvmw', position: 0.2040345076296982, value: 0, }, }, }, type: 'BasicKeyframedTrack', }, '8j4qgU9ixs': { __debugName: '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { y1gRdo2UII: true, }, byId: { y1gRdo2UII: { connectedRight: true, handles: [1, 1, 0, 0], id: 'y1gRdo2UII', position: 0.2040345076296982, value: 0, }, }, }, type: 'BasicKeyframedTrack', }, AW8aJl0uzc: { __debugName: '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { s6R2ZE3rsk: true, }, byId: { s6R2ZE3rsk: { connectedRight: true, handles: [1, 1, 0, 0], id: 's6R2ZE3rsk', position: 0.2040345076296982, value: 0, }, }, }, type: 'BasicKeyframedTrack', }, drr3se9khi: { __debugName: '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { abELNR0bDi: true, }, byId: { abELNR0bDi: { connectedRight: true, handles: [1, 1, 0, 0], id: 'abELNR0bDi', position: 0.2040345076296982, value: 1, }, }, }, type: 'BasicKeyframedTrack', }, jMeCN2ze4N: { __debugName: '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { aEdXhZzZ_0: true, }, byId: { aEdXhZzZ_0: { connectedRight: true, handles: [1, 1, 0, 0], id: 'aEdXhZzZ_0', position: 0.2040345076296982, value: 0, }, }, }, type: 'BasicKeyframedTrack', }, jxC__itrYq: { __debugName: '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { yiXlDmK4XU: true, }, byId: { yiXlDmK4XU: { connectedRight: true, handles: [1, 1, 0, 0], id: 'yiXlDmK4XU', position: 0.2040345076296982, value: 1, }, }, }, type: 'BasicKeyframedTrack', }, t1jGQM09oL: { __debugName: '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { n037J_uPYF: true, }, byId: { n037J_uPYF: { connectedRight: true, handles: [1, 1, 0, 0], id: 'n037J_uPYF', position: 0.2040345076296982, value: 1, }, }, }, type: 'BasicKeyframedTrack', }, xv8TOMoo8D: { __debugName: '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { Kq9pG6whii: true, }, byId: { Kq9pG6whii: { connectedRight: true, handles: [1, 1, 0, 0], id: 'Kq9pG6whii', position: 0.2040345076296982, value: 0, }, }, }, type: 'BasicKeyframedTrack', }, }, trackIdByPropPath: { '["position","x"]': '2QyuaCOpyh', '["position","y"]': '8j4qgU9ixs', '["position","z"]': 'xv8TOMoo8D', '["rotation","x"]': 'jMeCN2ze4N', '["rotation","y"]': 'AW8aJl0uzc', '["rotation","z"]': '7bIbAIlu0z', '["scale","x"]': 'drr3se9khi', '["scale","y"]': 'jxC__itrYq', '["scale","z"]': 't1jGQM09oL', }, }, 'c92ecedf-11fd-4b44-964c-48cad8db988e': { trackData: { jqEC2h328p: { __debugName: 'c92ecedf-11fd-4b44-964c-48cad8db988e: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { U6SV6Yaq1E: true, YTvNAfyskU: true, }, byId: { U6SV6Yaq1E: { connectedRight: true, handles: [1, 1, 0, 0], id: 'U6SV6Yaq1E', position: 0.2040345076296982, value: { a: 1, b: 0.07058823529411765, g: 0.06274509803921569, r: 0.058823529411764705, }, }, YTvNAfyskU: { connectedRight: true, handles: [1, 1, 0, 0], id: 'YTvNAfyskU', position: 0, value: { a: 1, b: 0.8352941176470589, g: 0.5411764705882353, r: 0.3411764705882353, }, }, }, }, type: 'BasicKeyframedTrack', }, }, trackIdByPropPath: { '["color"]': 'jqEC2h328p', }, }, 'ef817805-6d4a-4050-8f6d-c95201048c46': { trackData: { '6C6vD0Xqci': { __debugName: 'ef817805-6d4a-4050-8f6d-c95201048c46: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { AqFIqk3Nc6: true, ECDgpGmD6z: true, }, byId: { AqFIqk3Nc6: { connectedRight: true, handles: [1, 1, 0, 0], id: 'AqFIqk3Nc6', position: 0.2040345076296982, value: { a: 1, b: 0.07058823529411765, g: 0.06274509803921569, r: 0.058823529411764705, }, }, ECDgpGmD6z: { connectedRight: true, handles: [1, 1, 0, 0], id: 'ECDgpGmD6z', position: 0, value: { a: 1, b: 0.8352941176470589, g: 0.5411764705882353, r: 0.3411764705882353, }, }, }, }, type: 'BasicKeyframedTrack', }, }, trackIdByPropPath: { '["color"]': '6C6vD0Xqci', }, }, 'f27e556c-1c9c-4073-95dd-769c3235dd1e': { trackData: { '8JQppMZVGb': { __debugName: 'f27e556c-1c9c-4073-95dd-769c3235dd1e: objectAnimationData.trackData[trackDataId]', keyframes: { allIds: { 'pM5a5IWY-1': true, vR3G6j3AiX: true, }, byId: { 'pM5a5IWY-1': { connectedRight: true, handles: [1, 1, 0, 0], id: 'pM5a5IWY-1', position: 0.29927584013108866, value: { a: 1, b: 0, g: 0, r: 1, }, }, vR3G6j3AiX: { connectedRight: true, handles: [1, 1, 0, 0], id: 'vR3G6j3AiX', position: 0.3151609696497239, value: { a: 1, b: 1, g: 1, r: 1, }, }, }, }, type: 'BasicKeyframedTrack', }, }, trackIdByPropPath: { '["color"]': '8JQppMZVGb', }, }, }, type: 'PositionalSequence', unitType: 'percentage', }, staticOverrides: { byObject: {}, }, }, }, }, engineState: { autoResolutionSettings: { fpsThresholdAbsolute: 60, fpsThresholdMode: 'ABSOLUTE', fpsThresholdRelative: 100, isReductionEnabled: true, minResolution: 100, }, children: { 'c5d87496-61cc-4219-bb37-63e89dc7475d': [ '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6', '0930cc8b-f705-48fc-ad67-686a1792a3a0', 'e2d618f0-a3bd-4cd6-9fde-6f33fd974a0f', '22f2fbd0-63c6-4227-95bc-1c3061da6031', '90bfddb3-0369-497d-9a09-61017c395704', '452a24bd-9a9f-4739-905b-2dca3092f2a2', '9f893263-3052-45eb-ada3-c4d9427e5911', '5895b0b2-9a04-447f-9af0-a21ee0917c11', 'b1aa5f47-dce9-4192-b984-2f13c181a9af', 'ede8e5a9-7893-48ea-b689-afa60cfda26d', 'b067cf4a-6ace-4c72-aad7-280f6a8bd666', 'a510e253-8b0f-4066-9c99-746eecc284c1', '73ea8463-691e-413f-98cf-0a2721e6129b', '599453de-7554-4ee6-9604-c7eba6c87bab', '9d0fae61-89c5-405c-ab6d-a7ac6303330b', 'ea94b165-c53b-4704-87a9-1633ae09cd51', '8885de3b-83e7-4b3f-9b18-e1c6883bb348', '78c717ae-1f77-41b5-8468-bfd53ff555af', ], }, defaultCameraId: 'ea94b165-c53b-4704-87a9-1633ae09cd51', effects: { BLOOM: { blendFunction: 28, enabled: false, filter: false, intensity: 1, luminanceSmoothing: 0.025, luminanceThreshold: 0.9, opacity: 1, radius: 2, type: 'BLOOM', }, BRIGHTNESS_CONTRAST: { blendFunction: 23, brightness: 0, contrast: 0, enabled: false, opacity: 1, type: 'BRIGHTNESS_CONTRAST', }, COLOR_DEPTH: { bits: 16, blendFunction: 23, enabled: false, opacity: 1, type: 'COLOR_DEPTH', }, DOF: { blendFunction: 23, bokehScale: 2, enabled: false, focusDistance: 0, focusRange: 0.05, opacity: 1, resolutionScale: 1, type: 'DOF', }, HUE_SATURATION: { blendFunction: 23, enabled: false, hue: 0, opacity: 1, saturation: 0.4, type: 'HUE_SATURATION', }, NOISE: { blendFunction: 28, enabled: false, opacity: 1, type: 'NOISE', }, PIXELATION: { blendFunction: 23, enabled: false, granularity: 6, opacity: 1, type: 'PIXELATION', }, SMAA: { blendFunction: 30, edgeContrastFactor: 2, edgeMode: 2, edgeThreshold: 0.05, enabled: true, opacity: 1, predicationMode: 1, predicationScale: 2, predicationStrength: 0.4, predicationThreshold: 0.001, preset: 2, type: 'SMAA', }, TONE_MAPPING: { adaptationRate: 1, averageLuminance: 1, blendFunction: 23, enabled: false, exposure: 1, middleGrey: 0.6, minLuminance: 0.01, mode: 0, opacity: 1, resolution: 256, type: 'TONE_MAPPING', whitePoint: 4, }, VIGNETTE: { blendFunction: 23, darkness: 0.5, enabled: false, offset: 0.5, opacity: 1, technique: 0, type: 'VIGNETTE', }, }, parents: { '0930cc8b-f705-48fc-ad67-686a1792a3a0': 'c5d87496-61cc-4219-bb37-63e89dc7475d', '22f2fbd0-63c6-4227-95bc-1c3061da6031': 'c5d87496-61cc-4219-bb37-63e89dc7475d', '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6': 'c5d87496-61cc-4219-bb37-63e89dc7475d', '452a24bd-9a9f-4739-905b-2dca3092f2a2': 'c5d87496-61cc-4219-bb37-63e89dc7475d', '5895b0b2-9a04-447f-9af0-a21ee0917c11': 'c5d87496-61cc-4219-bb37-63e89dc7475d', '599453de-7554-4ee6-9604-c7eba6c87bab': 'c5d87496-61cc-4219-bb37-63e89dc7475d', '73ea8463-691e-413f-98cf-0a2721e6129b': 'c5d87496-61cc-4219-bb37-63e89dc7475d', '78c717ae-1f77-41b5-8468-bfd53ff555af': 'c5d87496-61cc-4219-bb37-63e89dc7475d', '8885de3b-83e7-4b3f-9b18-e1c6883bb348': 'c5d87496-61cc-4219-bb37-63e89dc7475d', '90bfddb3-0369-497d-9a09-61017c395704': 'c5d87496-61cc-4219-bb37-63e89dc7475d', '9d0fae61-89c5-405c-ab6d-a7ac6303330b': 'c5d87496-61cc-4219-bb37-63e89dc7475d', '9f893263-3052-45eb-ada3-c4d9427e5911': 'c5d87496-61cc-4219-bb37-63e89dc7475d', 'a510e253-8b0f-4066-9c99-746eecc284c1': 'c5d87496-61cc-4219-bb37-63e89dc7475d', 'b067cf4a-6ace-4c72-aad7-280f6a8bd666': 'c5d87496-61cc-4219-bb37-63e89dc7475d', 'b1aa5f47-dce9-4192-b984-2f13c181a9af': 'c5d87496-61cc-4219-bb37-63e89dc7475d', 'e2d618f0-a3bd-4cd6-9fde-6f33fd974a0f': 'c5d87496-61cc-4219-bb37-63e89dc7475d', 'ea94b165-c53b-4704-87a9-1633ae09cd51': 'c5d87496-61cc-4219-bb37-63e89dc7475d', 'ede8e5a9-7893-48ea-b689-afa60cfda26d': 'c5d87496-61cc-4219-bb37-63e89dc7475d', }, pwMaterials: { '1bc0a1b2-8e44-4a19-9e30-9856fdb7f4e5': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: '1bc0a1b2-8e44-4a19-9e30-9856fdb7f4e5', }, '1dd587ee-00f6-4c08-9abc-6caa90f425a3': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: '1dd587ee-00f6-4c08-9abc-6caa90f425a3', }, '1e24debf-3428-40af-8290-da01aa136234': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: '1e24debf-3428-40af-8290-da01aa136234', map: { assetType: 'TEXTURE', assetUrl: 'https://files.development.peachworlds.com/website/0dc9513e-5c52-4404-aa14-0ae1fa09046d/artworks-bf0rrkveckgbazkz-mqh05q-t500x500.jpg', center: { x: 0, y: 0, }, offset: { x: 0, y: 0, }, repeat: { x: 1, y: 1, }, uuid: '59a0d0e3-68dd-4692-92e6-74b97bd2696c', wrapS: 'Clamp', wrapT: 'Clamp', }, }, '31d0c326-053b-41cc-b555-03b153d70664': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: '31d0c326-053b-41cc-b555-03b153d70664', map: { assetType: 'TEXTURE', assetUrl: 'https://files.development.peachworlds.com/website/0dc9513e-5c52-4404-aa14-0ae1fa09046d/artworks-bf0rrkveckgbazkz-mqh05q-t500x500.jpg', center: { x: 0, y: 0, }, offset: { x: 0, y: 0, }, repeat: { x: 1, y: 1, }, uuid: '59a0d0e3-68dd-4692-92e6-74b97bd2696c', wrapS: 'Clamp', wrapT: 'Clamp', }, }, '41278b30-6fb8-462c-8cd9-addc8c701ef8': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: '41278b30-6fb8-462c-8cd9-addc8c701ef8', map: { assetType: 'TEXTURE', assetUrl: 'https://files.development.peachworlds.com/website/0dc9513e-5c52-4404-aa14-0ae1fa09046d/artworks-bf0rrkveckgbazkz-mqh05q-t500x500.jpg', center: { x: 0, y: 0, }, offset: { x: 0.3, y: 0, }, repeat: { x: 1, y: 1, }, uuid: '59a0d0e3-68dd-4692-92e6-74b97bd2696c', wrapS: 'Clamp', wrapT: 'Clamp', }, }, '42a70b20-df79-4aea-add8-fae956709611': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: '42a70b20-df79-4aea-add8-fae956709611', }, '4681e97e-7fbc-4d4d-a2c4-848c2133e1fb': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: '4681e97e-7fbc-4d4d-a2c4-848c2133e1fb', }, '6a05f57c-2c7f-4eb7-86e2-a8f557e7cf95': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: '6a05f57c-2c7f-4eb7-86e2-a8f557e7cf95', }, '807b6490-c51d-48f3-a402-3377b26b266e': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: '807b6490-c51d-48f3-a402-3377b26b266e', }, '8e50b7cb-3f1d-4005-98ee-08db52ed0a74': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: '8e50b7cb-3f1d-4005-98ee-08db52ed0a74', }, 'befbb6b9-9591-4290-8ca6-2ff74e926529': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: 'befbb6b9-9591-4290-8ca6-2ff74e926529', }, 'c7aaff7d-537b-457b-8cb1-81a231d2ccbd': { alphaTest: 0, color: '#75A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: 'c7aaff7d-537b-457b-8cb1-81a231d2ccbd', }, 'c92ecedf-11fd-4b44-964c-48cad8db988e': { alphaTest: 0, color: '#0f1012', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material Animated 2', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: 'c92ecedf-11fd-4b44-964c-48cad8db988e', }, 'e918994c-460a-463a-9e5e-59614ed9dd4b': { alphaTest: 0, color: '#00A5EC', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: 'e918994c-460a-463a-9e5e-59614ed9dd4b', }, 'ef817805-6d4a-4050-8f6d-c95201048c46': { alphaTest: 0, color: '#0f1012', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material Animated', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: 'ef817805-6d4a-4050-8f6d-c95201048c46', }, 'f27e556c-1c9c-4073-95dd-769c3235dd1e': { alphaTest: 0, color: '#ff0000', displacementScale: 1, emissive: '#000000', emissiveIntensity: 1, flatShading: false, metalness: 0, aoMapIntensity: 1.0, name: 'Cube Material Animated 3', opacity: 1, roughness: 1, side: 'FRONT', transparent: false, type: 'LIT', uuid: 'f27e556c-1c9c-4073-95dd-769c3235dd1e', }, }, pwObjects: { '0930cc8b-f705-48fc-ad67-686a1792a3a0': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: 'b58c079f-f020-4e57-8f42-c62b4691a93a', width: 1, widthSegments: 1, }, materialId: 'ef817805-6d4a-4050-8f6d-c95201048c46', name: 'Cube Animated', position: { x: -4.368001668600878, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: '0930cc8b-f705-48fc-ad67-686a1792a3a0', visible: true, }, '22f2fbd0-63c6-4227-95bc-1c3061da6031': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: '543690c1-9e53-4d83-8f09-c99ad5eeb326', width: 1, widthSegments: 1, }, materialId: '41278b30-6fb8-462c-8cd9-addc8c701ef8', name: 'Cube', position: { x: 0, y: 0.1262927017163331, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: '22f2fbd0-63c6-4227-95bc-1c3061da6031', visible: true, }, '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: '62d3c7f2-74c9-4f58-b009-031606a649f1', width: 1, widthSegments: 1, }, materialId: 'c92ecedf-11fd-4b44-964c-48cad8db988e', name: 'Cube Animated', position: { x: -4.368001668600878, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: '287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6', visible: true, }, '452a24bd-9a9f-4739-905b-2dca3092f2a2': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: '0952ba9d-a97f-48b6-9cbd-ba13e5b96cae', width: 1, widthSegments: 1, }, materialId: '1bc0a1b2-8e44-4a19-9e30-9856fdb7f4e5', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: '452a24bd-9a9f-4739-905b-2dca3092f2a2', visible: true, }, '5895b0b2-9a04-447f-9af0-a21ee0917c11': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: 'b020db84-f333-45b2-8a07-0677917bbedc', width: 1, widthSegments: 1, }, materialId: 'c7aaff7d-537b-457b-8cb1-81a231d2ccbd', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: '5895b0b2-9a04-447f-9af0-a21ee0917c11', visible: true, }, '599453de-7554-4ee6-9604-c7eba6c87bab': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: '41688e66-46a4-481d-a3bc-35cd6454cb44', width: 1, widthSegments: 1, }, materialId: '8e50b7cb-3f1d-4005-98ee-08db52ed0a74', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: '599453de-7554-4ee6-9604-c7eba6c87bab', visible: true, }, '73ea8463-691e-413f-98cf-0a2721e6129b': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: '23540449-1d27-4096-b74b-d95cf5b1e64e', width: 1, widthSegments: 1, }, materialId: 'befbb6b9-9591-4290-8ca6-2ff74e926529', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: '73ea8463-691e-413f-98cf-0a2721e6129b', visible: true, }, '78c717ae-1f77-41b5-8468-bfd53ff555af': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: 'b84b0cb7-fa5c-4c68-8c7e-d306afa9b21a', width: 1, widthSegments: 1, }, materialId: '1dd587ee-00f6-4c08-9abc-6caa90f425a3', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: '78c717ae-1f77-41b5-8468-bfd53ff555af', visible: true, }, '8885de3b-83e7-4b3f-9b18-e1c6883bb348': { castShadow: true, color: '#FFFFFF', intensity: 2.2, lightType: 'DIRECTIONAL', name: 'Light', position: { x: 0, y: 10, z: -10, }, receiveShadow: false, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, shadowQuality: 1024, type: 'LIGHT', uuid: '8885de3b-83e7-4b3f-9b18-e1c6883bb348', visible: true, }, '90bfddb3-0369-497d-9a09-61017c395704': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: '814c7f83-c762-429a-926d-be56b34bc4d6', width: 1, widthSegments: 1, }, materialId: '6a05f57c-2c7f-4eb7-86e2-a8f557e7cf95', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: '90bfddb3-0369-497d-9a09-61017c395704', visible: true, }, '9d0fae61-89c5-405c-ab6d-a7ac6303330b': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: 'b6439afb-719c-40c2-b1e9-3a67563fd29d', width: 1, widthSegments: 1, }, materialId: '31d0c326-053b-41cc-b555-03b153d70664', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: '9d0fae61-89c5-405c-ab6d-a7ac6303330b', visible: true, }, '9f893263-3052-45eb-ada3-c4d9427e5911': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: '1ac992bf-7b0f-41b6-8a47-99813218c811', width: 1, widthSegments: 1, }, materialId: '4681e97e-7fbc-4d4d-a2c4-848c2133e1fb', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: '9f893263-3052-45eb-ada3-c4d9427e5911', visible: true, }, 'a510e253-8b0f-4066-9c99-746eecc284c1': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: 'ce8e4ff2-1bd5-4415-91f0-1ccc3870a549', width: 1, widthSegments: 1, }, materialId: '42a70b20-df79-4aea-add8-fae956709611', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: 'a510e253-8b0f-4066-9c99-746eecc284c1', visible: true, }, 'b067cf4a-6ace-4c72-aad7-280f6a8bd666': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: 'a2852ba6-5cc8-4cce-a83b-6479586da24c', width: 1, widthSegments: 1, }, materialId: '807b6490-c51d-48f3-a402-3377b26b266e', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: 'b067cf4a-6ace-4c72-aad7-280f6a8bd666', visible: true, }, 'b1aa5f47-dce9-4192-b984-2f13c181a9af': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: 'd94bf1e4-24ef-4f89-b97e-a1119c2109fc', width: 1, widthSegments: 1, }, materialId: '1e24debf-3428-40af-8290-da01aa136234', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: 'b1aa5f47-dce9-4192-b984-2f13c181a9af', visible: true, }, 'c5d87496-61cc-4219-bb37-63e89dc7475d': { ambientLight: { castShadow: false, color: '#FFFFFF', intensity: 3, lightType: 'AMBIENT', name: 'light', position: { x: 0, y: 0, z: 0, }, receiveShadow: false, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, shadowQuality: 1024, type: 'LIGHT', uuid: '93a42989-2cc8-46ff-b380-9c29667f5441', visible: true, }, background: '#cbcbcb', backgroundBlurriness: 0, castShadow: false, multisampling: { enabled: false, samples: 8, }, name: 'scene', position: { x: 0, y: 0, z: 0, }, receiveShadow: false, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'SCENE', uuid: 'c5d87496-61cc-4219-bb37-63e89dc7475d', visible: true, }, 'e2d618f0-a3bd-4cd6-9fde-6f33fd974a0f': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: 'd101f33a-0a29-4ab5-8d15-2282695cce52', width: 1, widthSegments: 1, }, materialId: 'e918994c-460a-463a-9e5e-59614ed9dd4b', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: 'e2d618f0-a3bd-4cd6-9fde-6f33fd974a0f', visible: true, }, 'ea94b165-c53b-4704-87a9-1633ae09cd51': { cameraType: 'PERSPECTIVE', castShadow: false, far: 1000, fov: 60, name: 'Main Camera', near: 0.1, position: { x: 0, y: 4, z: 15, }, receiveShadow: false, rotation: { x: -0.39269908169872414, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'CAMERA', uuid: 'ea94b165-c53b-4704-87a9-1633ae09cd51', visible: true, zoom: 1, }, 'ede8e5a9-7893-48ea-b689-afa60cfda26d': { castShadow: false, geometry: { depth: 1, depthSegments: 1, height: 1, heightSegments: 1, type: 'BOX', uuid: '5ffee358-90ad-4971-8e23-7dc761ee63fe', width: 1, widthSegments: 1, }, materialId: 'f27e556c-1c9c-4073-95dd-769c3235dd1e', name: 'Cube', position: { x: 0, y: 0, z: 0, }, receiveShadow: true, rotation: { x: 0, y: 0, z: 0, }, scale: { x: 1, y: 1, z: 1, }, type: 'MESH', uuid: 'ede8e5a9-7893-48ea-b689-afa60cfda26d', visible: true, }, }, pwObjectsUsingPwMaterial: { '1bc0a1b2-8e44-4a19-9e30-9856fdb7f4e5': ['452a24bd-9a9f-4739-905b-2dca3092f2a2'], '1dd587ee-00f6-4c08-9abc-6caa90f425a3': ['78c717ae-1f77-41b5-8468-bfd53ff555af'], '1e24debf-3428-40af-8290-da01aa136234': ['b1aa5f47-dce9-4192-b984-2f13c181a9af'], '31d0c326-053b-41cc-b555-03b153d70664': ['9d0fae61-89c5-405c-ab6d-a7ac6303330b'], '41278b30-6fb8-462c-8cd9-addc8c701ef8': ['22f2fbd0-63c6-4227-95bc-1c3061da6031'], '42a70b20-df79-4aea-add8-fae956709611': ['a510e253-8b0f-4066-9c99-746eecc284c1'], '4681e97e-7fbc-4d4d-a2c4-848c2133e1fb': ['9f893263-3052-45eb-ada3-c4d9427e5911'], '6a05f57c-2c7f-4eb7-86e2-a8f557e7cf95': ['90bfddb3-0369-497d-9a09-61017c395704'], '807b6490-c51d-48f3-a402-3377b26b266e': ['b067cf4a-6ace-4c72-aad7-280f6a8bd666'], '8e50b7cb-3f1d-4005-98ee-08db52ed0a74': ['599453de-7554-4ee6-9604-c7eba6c87bab'], 'befbb6b9-9591-4290-8ca6-2ff74e926529': ['73ea8463-691e-413f-98cf-0a2721e6129b'], 'c7aaff7d-537b-457b-8cb1-81a231d2ccbd': ['5895b0b2-9a04-447f-9af0-a21ee0917c11'], 'c92ecedf-11fd-4b44-964c-48cad8db988e': ['287ec0a2-f3cf-4bc0-b897-d1898c3ff8d6'], 'e918994c-460a-463a-9e5e-59614ed9dd4b': ['e2d618f0-a3bd-4cd6-9fde-6f33fd974a0f'], 'ef817805-6d4a-4050-8f6d-c95201048c46': ['0930cc8b-f705-48fc-ad67-686a1792a3a0'], 'f27e556c-1c9c-4073-95dd-769c3235dd1e': ['ede8e5a9-7893-48ea-b689-afa60cfda26d'], }, renderer: {}, sceneObjectId: 'c5d87496-61cc-4219-bb37-63e89dc7475d', sharedMaterials: [], usePostProcessing: false, }, name: 'Main Scene', sceneBuilderState: { builderCameraPosition: { x: 3, y: 3, z: 10, }, builderCameraTarget: { x: 0, y: 0, z: 0, }, cameraPreviewId: 'ea94b165-c53b-4704-87a9-1633ae09cd51', lockedObjectsIds: [], }, uuid: '7287c131-2d20-4942-871d-93e853854ed1', }, }, }, }; var myCopy = null;
Tests:
JSON.stringify
myCopy = JSON.parse(JSON.stringify(MyObject));
structuredClone
myCopy = structuredClone(MyObject);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
JSON.stringify
structuredClone
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
Browser/OS:
Firefox 136 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
JSON.stringify
4080.9 Ops/sec
structuredClone
3636.5 Ops/sec
Autogenerated LLM Summary
(model
gpt-4o-mini
, generated one year ago):
### Benchmark Overview This benchmark compares two methods of deep cloning a JavaScript object: `JSON.stringify` combined with `JSON.parse`, and `structuredClone`. The primary goal is to evaluate the performance (in terms of executions per second) of each method when handling a large JavaScript object defined as `MyObject`. ### Methods Compared 1. **`JSON.stringify` and `JSON.parse`** - **Usage**: This technique converts the JavaScript object into a JSON string through `JSON.stringify`, then parses that string back into a JavaScript object using `JSON.parse`. - **Pros**: - Simple and widely supported in all JavaScript environments. - Suitable for simple JSON-compatible objects, which only contain properties that are serializable. - **Cons**: - Fails on complex data types like functions, `undefined`, `Date`, `RegExp`, `Map`, and `Set`, which will be lost in the cloning process. - Potentially slower performance for very large objects as both serialization and deserialization require additional memory and processing. - Deeply nested structures may cause performance bottlenecks. 2. **`structuredClone`** - **Usage**: This method is specifically designed to create a deep copy of a JavaScript object, handling various data types including dates, maps, and sets. - **Pros**: - Handles a broader range of data types compared to the JSON methods, preserving more complex structures. - More efficient for cloning large or complex objects. - **Cons**: - Available in modern environments (not available in Internet Explorer). - Slightly less intuitive syntax if you're accustomed to the traditional JSON methods. ### Benchmarking Results The benchmark produced the following results: - **`JSON.stringify` Execution per Second**: 4080.95 - **`structuredClone` Execution per Second**: 3636.48 Despite `structuredClone` being more versatile, `JSON.stringify` performed slightly better in terms of raw execution speed in this benchmark. ### Conclusion and Alternatives In conclusion, developers should choose an object cloning method based on their specific requirements: - **Use `JSON.stringify`** when: - You are dealing with simple JSON-compatible objects. - You need browser compatibility for outdated environments (such as older browsers). - **Use `structuredClone`** when: - You need to handle more complex data types. - Performance with large objects is critical, and you are operating in a modern environment. ### Other Alternatives Other alternatives for deep cloning include: - **Lodash's `cloneDeep`**: This utility library method provides robust cloning capabilities that can handle complex data types and structures. However, it adds external dependencies and may have a performance overhead compared to native options. - **Custom Cloning Functions**: For specific use cases, custom functions can be written to handle specific cloning scenarios, but they're often more error-prone and require maintenance. - **Using the Spread Operator with Objects**: For shallow copying of objects, the spread operator can be an option, though it does not provide deep cloning capabilities. In summary, the choice of deep cloning method should be guided by the specific needs of the application while considering performance implications and complexity of the objects being cloned.
Related benchmarks:
clone json
clone json 2
clone json Dan 6
JSON clone
Lodash.isEqual vs JSON.stringify sec
Lodash cloneDeep vs JSON clone vs structuredClone huge object 2
Lodash cloneDeep vs structuredClone vs JSON Parse 2023
Lodash cloneDeep vs structuredClone vs recursiveDeepCopy vs JSON clone (larger object)
JSON.stringify vs structuredClone vs cloneDeep 2
Comments
Confirm delete:
Do you really want to delete benchmark?