Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Large Object cloning
(version: 0)
compare array copy/clone methods sdfewfe
Comparing performance of:
Lodash cloneDeep vs Native JSON parse vs Recursive deep clone vs Object.assign shallow clone vs structuredClone
Created:
2 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var testArray = { "studyType": 1, "settings": { "SAVE_STUDY_MSG": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=saveStudyMsg", "DELETE_STUDY_MSG": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=deleteStudyMsg", "LOAD_WELCOME_MSGS": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=loadWelcomeMsgs", "LOAD_END_MSGS": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=loadEndMsgs", "useGlobalQuota": false, "globalQuota": 100, "quotaUnits": "abs", "responsesCount": 53, "completesCount": 25, "draftAutoSavedSinceTimer": null, "autoSavedSince": 1202535, "autoSaveTimeStamp": 1687383952, "indicateAutoSaving": false, "isPostTaskOneByOne": false, "allowDesktopBrowsers": true, "allowedPlatforms": { "desktop": true, "webext": true, "android": true, "ios": true }, "webExtRequirement": 2, "uninstallExt": true, "useRedirectUrls": false, "urlParameterName": "IDIN", "completionUrl": "https://measuringu.com/completion-redirect?uid={p}", "quotaUrl": "https://measuringu.com/overall-quota-redirect?uid={p}", "terminationUrl": "https://measuringu.com/screenout-redirect?uid={p}", "redirectSourceTree": { "id": 0, "parentId": null, "pos": 1, "nodeType": "root", "name": "All Panels", "nodesets": { "redirects": {} } }, "redirectUrlRules": { "URL should include http/https part": {} }, "redirectSourceParamRules": { "Only letters and digits are allowed": {}, "Length should be between 1-5 characters": {} }, "urlParamRules": { "Only letters and numbers are allowed": {} }, "activeEditedMsgs": [], "studyQuotaMsg": "<p>Thank you for your interest, but this study has been filled and cannot be taken anymore.</p>", "welcomeMessages": [], "selWelcomeMsgId": 0, "studyWelcomeMsg": "<p>Thank you for participating in this evaluation.</p><p><br></p><p>You will be asked to perform a few tasks on a website. After you have read the task and are ready to proceed, click the “Start Task” button. The task instructions will also be shown in a small window on the bottom of your screen so you can refer to them throughout the task. Once you feel that you have completed the task successfully, click the \"End Task\" button.</p><p><br></p><p>Please remember that this is an evaluation of the website and not you, so do the best you can to complete the tasks. Some tasks may be harder than others. Have a piece of paper and pen ready as you will be asked to write down information during some tasks.</p>", "showWelcomeMsg": true, "endMessages": [], "selEndMsgId": 0, "studyEndMsg": "<p>Thank you. Your responses have been submitted. We appreciate your time and effort.</p>", "studyStoppedMsg": "<p>Sorry, this study has been paused, and cannot be taken right now.</p>", "studyName": "Steve - Scroll Click Test", "defaultMsgs": { "defaultTaskWelcomeMsg": "<p>Thank you for participating in this evaluation.</p><br/><p>You will be asked to perform a few tasks on a website. After you have read the task and are ready to proceed, click the “Start Task” button. The task instructions will also be shown in a small window on the bottom of your screen so you can refer to them throughout the task. Once you feel that you have completed the task successfully, click the \"End Task\" button.</p><br/><p>Please remember that this is an evaluation of the website and not you, so do the best you can to complete the tasks. Some tasks may be harder than others. Have a piece of paper and pen ready as you will be asked to write down information during some tasks.</p>", "defaultCustWelcomeMsg": "<p>Thank you for participating in this evaluation. Let's get started.</p>", "defaultEndMsg": "<p>Thank you. Your responses have been submitted. We appreciate your time and effort.</p>", "defaultScreenoutMsg": "<p>Thank you for your interest in taking our survey. Based on your response, you do not meet the qualifications for our survey.</p>" }, "ownerInfo": { "uid": "4", "users_name": "steve", "full_name": "Steve Jenks", "email": "steve@measuringu.com" }, "taskTranslations": { "Please wait...": { "en": "Please wait..." }, "Done": { "en": "Done" }, "Start task": { "en": "Start task" }, "Proceed": { "en": "Proceed" }, "Re-start Task": { "en": "Re-start Task" }, "End Task": { "en": "End Task" }, "Confirm Selected Element": { "en": "Confirm Selected Element" }, "Change Selection": { "en": "Change Selection" }, "Task description": { "en": "Task description" }, "Open Chrome Web Store to Install Browser Extension": { "en": "Open Chrome Web Store to Install Browser Extension" }, "Open Firefox Add-ons to Install Browser Extension": { "en": "Open Firefox Add-ons to Install Browser Extension" }, "Install MeasuringU Android survey tool": { "en": "Install MeasuringU Android survey tool" }, "Copy Link and Install Survey App": { "en": "Copy Link and Install Survey App" }, "Decline Install and Continue to Survey": { "en": "Decline Install and Continue to Survey" } }, "extUpperMsg": { "en": { "desktop": "", "mobile": "" } }, "extLowerMsg": { "en": { "desktop": "", "mobile": "" } }, "condRandTypes": [{ "id": 0, "markup": "All Conditions" }, { "id": 1, "markup": "Just One Condition" }, { "id": 2, "markup": "One Fixed Condition and Another at Random" }], "allCondTypes": [{ "id": 1, "markup": "In Listed Order" }, { "id": 3, "markup": "In Fully Randomized Order" }], "oneCondTypes": [{ "id": 2, "markup": "Assigned At Random" }, { "id": 5, "markup": "Assigned Based on Criteria" }], "oneFixedCondTypes": [{ "id": 4, "markup": "Fixed Condition First" }], "activeCondRandType": 2, "activeCondRandDDItem": 1, "randomCondNum": 1, "mandatoryCondId": null, "taskRandTypes": [{ "id": 1, "markup": "All Sequentially" }, { "id": 2, "markup": "Random (All Tasks)" }, { "id": 3, "markup": "Random (Partially)" }], "comparisonTaskRandTypes": [{ "id": 1, "markup": "All Sequentially" }, { "id": 2, "markup": "Random (All Tasks)" }], "activeTaskRandType": 1, "partialRandTasksNum": 0, "useGroupRand": false, "enableBackwardsNavigation": true, "showProgressBar": true, "activeStudySavedSettingsState": {} }, "struct": { "STATUS_CHANGE_URL": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=updateStudyBackendState", "BUILD_STUDY": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=buildStudy", "GET_STUDY_INFO": "/index.php/plugins/direct?plugin=SimpleStartUpPlugin&function=getDraftInfo&sid=", "SAVE_DRAFT": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=saveStudyDraft", "LOAD_DRAFT": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=loadStudyDraft", "REQUEST_DRAFT_STATE": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=getCurrentDraftState", "LOAD_DRAFT_BY_TPL": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=loadStudyDraftByTplId", "LOAD_DRAFT_STRUCT": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=loadStudyDraftStruct", "DELETE_LS_STUDY": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=delLsStudy", "DUPE_IMGS": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=duplicateDraftImages", "SAVE_ACTIVE_STUDY_CHANGES": "/index.php/plugins/unsecure?plugin=SimpleStartUpPlugin&function=saveActiveStudyStructChanges", "hasWebTasks": false, "hasTextTasks": false, "hasVariants": false, "hasConditions": false, "hasCards": false, "hasLegacyTrees": false, "hasTreeTest": false, "recordingEnabled": { "13619": { "videoIsRecorded": false, "eventsAreRecorded": false }, "13620": { "videoIsRecorded": false, "eventsAreRecorded": false }, "13621": { "videoIsRecorded": false, "eventsAreRecorded": false } }, "sspToDbIdMap": { "IntroWelcomeMsg": { "dbQid": "13611", "dbGid": "2786", "dbData": { "subQIds": [], "answerOptIds": [], "quotaIds": [], "defAnswerIds": [] }, "variants": [] }, "OverallQuota": { "dbQid": "13612", "dbGid": "2786", "dbData": { "subQIds": [], "answerOptIds": [], "quotaIds": { "OverallQuota": { "quotaId": "268", "quotaLanguageSettingsId": "268", "items": { "268": { "id": "268", "qid": "13612", "quota_id": "268", "code": "Y" } } }, "StudyPausedQuotaMsg": { "quotaId": "269", "quotaLanguageSettingsId": "269", "items": { "269": { "id": "269", "qid": "13612", "quota_id": "269", "code": "Y" } } } }, "defAnswerIds": [{ "qid": "13612", "scale_id": 0, "sqid": 0, "language": "en", "specialtype": "", "defaultvalue": "Y" }] }, "variants": [] }, "StudyCompleteIncl": { "dbQid": "13613", "dbGid": "2786", "dbData": { "subQIds": [], "answerOptIds": [], "quotaIds": [], "defAnswerIds": [{ "qid": "13613", "scale_id": 0, "sqid": 0, "language": "en", "specialtype": "", "defaultvalue": "N" }] }, "variants": [] }, "MP": { "dbQid": "13614", "dbGid": "2786", "dbData": { "subQIds": [], "answerOptIds": [], "quotaIds": [], "defAnswerIds": [] }, "variants": [] }, "IDIN": { "dbQid": "13615", "dbGid": "2786", "dbData": { "subQIds": [], "answerOptIds": [], "quotaIds": [], "defAnswerIds": [] }, "variants": [] }, "STUDYIN": { "dbQid": "13616", "dbGid": "2786", "dbData": { "subQIds": [], "answerOptIds": [], "quotaIds": [], "defAnswerIds": [] }, "variants": [] }, "CONDITION": { "dbQid": "13617", "dbGid": "2786", "dbData": { "subQIds": [], "answerOptIds": [], "quotaIds": [], "defAnswerIds": [] }, "variants": [] }, "ExtInstallMarker": { "dbQid": "13618", "dbGid": "2787", "dbData": { "subQIds": [], "answerOptIds": [], "quotaIds": [], "defAnswerIds": [] }, "variants": [] }, "1687373201560": { "dbQid": "13619", "dbGid": "2788", "dbData": { "subQIds": [], "answerOptIds": [], "quotaIds": [], "defAnswerIds": [], "taskAuxQIds": [] }, "variants": [] }, "1687373264467": { "dbQid": "13620", "dbGid": "2789", "dbData": { "subQIds": [], "answerOptIds": [], "quotaIds": [], "defAnswerIds": [], "taskAuxQIds": [] }, "variants": [] }, "1687373276864": { "dbQid": "13621", "dbGid": "2790", "dbData": { "subQIds": [], "answerOptIds": [], "quotaIds": [], "defAnswerIds": [], "taskAuxQIds": [] }, "variants": [] } }, "newLinkBlueprint": { "includedItemType": "tasks", "includedItems": {}, "hasAllSelected": false }, "clonedItemId": null, "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "structHelpers": { "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "treeTestHelpers": { "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "dataGenerator": { "state": { "id": 0, "defaultFileTypes": ["jpg", "jpeg", "png", "gif", "tiff", "bmp", "psd", "svg", "ai", "pdf", "eps", "heic", "mov", "avi", "flv", "wmv", "wav", "aiff", "flac", "ogg", "mp3", "mp4", "doc", "docx", "tex", "txt", "xls", "xlsx", "csv"], "newQuestionAttrs": { "rowsPerHeader": 25, "ratingScaleMinText": "Strongly Disagree", "ratingScaleMaxText": "Strongly Agree", "displayNumRows": -1, "randomCardOrder": true, "complexQuotaProps": { "useScreenout": false, "useQuota": false, "quotaNum": 0 }, "iconFocusSizeCustomPx": 0, "allowEditingClosedCats": null }, "newTaskAttrs": { "taskType": 1, "vidRecQuality": 0, "webcamRecEnabled": false, "urlProtocol": 1, "endTaskOnUrl": false, "endTaskUrls": [], "endTaskUrlMsg": "", "embedTaskWnd": false, "showEndTaskUrlMsg": false, "activeTreeId": "", "correctTreeNodeIds": [], "recGroupType": 4 }, "newConditionAttrs": { "condCriteriaQuotaEnabled": false, "condCriteriaQuotaValue": 20 }, "taskRecordingProperties": ["recGroupType", "useEventRec", "useVideoRec", "webcamRecEnabled", "audioRecEnabled", "privateMode", "screenRecWidth", "webcamRecWidth", "webcamPos", "restrictRecToUrls", "allowedRecUrls", "startTaskWhenRecForbidden", "vidRecQuality"] }, "getters": {}, "mutations": {}, "actions": {} } }, "lastUniqueKey": 0, "oneScaleQTypes": [3, 2, 4, 5, 7, 8, 9, 12, 6, 11, 10, 13, 14, 21, 20, 27, 28, 29, 31, 32], "twoScaleQTypes": [32, 6, 11, 10, 13, 14, 30, 31], "threeScaleQTypes": [14], "noScaleQTypes": [18, 23, 24, 25, 26, 15, 16, 17, 19, 22] }, "filterHelpers": { "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "structHelpers": { "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "treeTestHelpers": { "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "dataGenerator": { "state": { "id": 0, "defaultFileTypes": ["jpg", "jpeg", "png", "gif", "tiff", "bmp", "psd", "svg", "ai", "pdf", "eps", "heic", "mov", "avi", "flv", "wmv", "wav", "aiff", "flac", "ogg", "mp3", "mp4", "doc", "docx", "tex", "txt", "xls", "xlsx", "csv"], "newQuestionAttrs": { "rowsPerHeader": 25, "ratingScaleMinText": "Strongly Disagree", "ratingScaleMaxText": "Strongly Agree", "displayNumRows": -1, "randomCardOrder": true, "complexQuotaProps": { "useScreenout": false, "useQuota": false, "quotaNum": 0 }, "iconFocusSizeCustomPx": 0, "allowEditingClosedCats": null }, "newTaskAttrs": { "taskType": 1, "vidRecQuality": 0, "webcamRecEnabled": false, "urlProtocol": 1, "endTaskOnUrl": false, "endTaskUrls": [], "endTaskUrlMsg": "", "embedTaskWnd": false, "showEndTaskUrlMsg": false, "activeTreeId": "", "correctTreeNodeIds": [], "recGroupType": 4 }, "newConditionAttrs": { "condCriteriaQuotaEnabled": false, "condCriteriaQuotaValue": 20 }, "taskRecordingProperties": ["recGroupType", "useEventRec", "useVideoRec", "webcamRecEnabled", "audioRecEnabled", "privateMode", "screenRecWidth", "webcamRecWidth", "webcamPos", "restrictRecToUrls", "allowedRecUrls", "startTaskWhenRecForbidden", "vidRecQuality"] }, "getters": {}, "mutations": {}, "actions": {} } }, "lastUniqueKey": 0, "oneScaleQTypes": [3, 2, 4, 5, 7, 8, 9, 12, 6, 11, 10, 13, 14, 21, 20, 27, 28, 29, 31, 32], "twoScaleQTypes": [32, 6, 11, 10, 13, 14, 30, 31], "threeScaleQTypes": [14], "noScaleQTypes": [18, 23, 24, 25, 26, 15, 16, 17, 19, 22] }, "linkHelpers": { "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "structHelpers": { "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "treeTestHelpers": { "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "dataGenerator": { "state": { "id": 0, "defaultFileTypes": ["jpg", "jpeg", "png", "gif", "tiff", "bmp", "psd", "svg", "ai", "pdf", "eps", "heic", "mov", "avi", "flv", "wmv", "wav", "aiff", "flac", "ogg", "mp3", "mp4", "doc", "docx", "tex", "txt", "xls", "xlsx", "csv"], "newQuestionAttrs": { "rowsPerHeader": 25, "ratingScaleMinText": "Strongly Disagree", "ratingScaleMaxText": "Strongly Agree", "displayNumRows": -1, "randomCardOrder": true, "complexQuotaProps": { "useScreenout": false, "useQuota": false, "quotaNum": 0 }, "iconFocusSizeCustomPx": 0, "allowEditingClosedCats": null }, "newTaskAttrs": { "taskType": 1, "vidRecQuality": 0, "webcamRecEnabled": false, "urlProtocol": 1, "endTaskOnUrl": false, "endTaskUrls": [], "endTaskUrlMsg": "", "embedTaskWnd": false, "showEndTaskUrlMsg": false, "activeTreeId": "", "correctTreeNodeIds": [], "recGroupType": 4 }, "newConditionAttrs": { "condCriteriaQuotaEnabled": false, "condCriteriaQuotaValue": 20 }, "taskRecordingProperties": ["recGroupType", "useEventRec", "useVideoRec", "webcamRecEnabled", "audioRecEnabled", "privateMode", "screenRecWidth", "webcamRecWidth", "webcamPos", "restrictRecToUrls", "allowedRecUrls", "startTaskWhenRecForbidden", "vidRecQuality"] }, "getters": {}, "mutations": {}, "actions": {} } }, "lastUniqueKey": 0, "oneScaleQTypes": [3, 2, 4, 5, 7, 8, 9, 12, 6, 11, 10, 13, 14, 21, 20, 27, 28, 29, 31, 32], "twoScaleQTypes": [32, 6, 11, 10, 13, 14, 30, 31], "threeScaleQTypes": [14], "noScaleQTypes": [18, 23, 24, 25, 26, 15, 16, 17, 19, 22] } }, "filterDropdownOptions": [{ "id": 0, "markup": "<span class=\"ls-question__filter-selector-opt\"><span class=\"fas fa-eye\"></span> Always Shown</span>" }, { "id": 1, "markup": "<span class=\"ls-question__filter-selector-opt\"><span class=\"fas fa-eye\"></span> Only Shown If...</span>" }] }, "linkHelpers": { "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "structHelpers": { "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "treeTestHelpers": { "treeHelpers": { "lastUniqueId": null, "NODE_SET_ORDERS": { "validation": 1, "postTask": 2, "dimOneItems": 1, "dimTwoItems": 2, "dimThreeItems": 3, "preQuestions": 1, "tasks": 2, "postQuestions": 3, "questions": 1, "prestudy": 1, "groups": 2, "conditions": 2, "poststudy": 3 } }, "dataGenerator": { "state": { "id": 0, "defaultFileTypes": ["jpg", "jpeg", "png", "gif", "tiff", "bmp", "psd", "svg", "ai", "pdf", "eps", "heic", "mov", "avi", "flv", "wmv", "wav", "aiff", "flac", "ogg", "mp3", "mp4", "doc", "docx", "tex", "txt", "xls", "xlsx", "csv"], "newQuestionAttrs": { "rowsPerHeader": 25, "ratingScaleMinText": "Strongly Disagree", "ratingScaleMaxText": "Strongly Agree", "displayNumRows": -1, "randomCardOrder": true, "complexQuotaProps": { "useScreenout": false, "useQuota": false, "quotaNum": 0 }, "iconFocusSizeCustomPx": 0, "allowEditingClosedCats": null }, "newTaskAttrs": { "taskType": 1, "vidRecQuality": 0, "webcamRecEnabled": false, "urlProtocol": 1, "endTaskOnUrl": false, "endTaskUrls": [], "endTaskUrlMsg": "", "embedTaskWnd": false, "showEndTaskUrlMsg": false, "activeTreeId": "", "correctTreeNodeIds": [], "recGroupType": 4 }, "newConditionAttrs": { "condCriteriaQuotaEnabled": false, "condCriteriaQuotaValue": 20 }, "taskRecordingProperties": ["recGroupType", "useEventRec", "useVideoRec", "webcamRecEnabled", "audioRecEnabled", "privateMode", "screenRecWidth", "webcamRecWidth", "webcamPos", "restrictRecToUrls", "allowedRecUrls", "startTaskWhenRecForbidden", "vidRecQuality"] }, "getters": {}, "mutations": {}, "actions": {} } }, "lastUniqueKey": 0, "oneScaleQTypes": [3, 2, 4, 5, 7, 8, 9, 12, 6, 11, 10, 13, 14, 21, 20, 27, 28, 29, 31, 32], "twoScaleQTypes": [32, 6, 11, 10, 13, 14, 30, 31], "threeScaleQTypes": [14], "noScaleQTypes": [18, 23, 24, 25, 26, 15, 16, 17, 19, 22] } }, "groupTree": { "id": 0, "parentId": null, "pos": 1, "nodeType": "root", "name": "All Groups", "nodesets": { "groups": {} } }, "taskTree": { "id": 0, "parentId": null, "pos": 1, "nodeType": "root", "name": "All Tasks", "nodesets": { "prestudy": {}, "tasks": { "1687373201560": { "id": 1687373201560, "pos": 1, "nodeType": "task", "nodesets": { "validation": { "1687373197039": { "id": 1687373197039, "pos": 1, "nodeType": "ls-question", "nodesets": { "dimOneItems": {}, "dimTwoItems": {}, "dimThreeItems": {} }, "isEditable": true, "isDeletable": true, "isSortable": true, "isDraggable": true, "name": "ValidQ1", "qType": 4, "text": "", "isMandatory": true, "allowOther": false, "otherOptionText": "Other", "haveDefaults": false, "haveRandomOrder": false, "subqWidth": 0, "zeroBasedCodes": false, "useMinMax": false, "minValue": 1, "maxValue": 1, "ratingScaleMinText": "Strongly Disagree", "ratingScaleMaxText": "Strongly Agree", "pageBreakMode": 1, "useScreenout": false, "quotaMessage": "Thank you for your interest in taking our survey. Based on your response, you do not meet the qualifications for our survey.", "useQuotaCustomLimit": false, "customScrItems": [], "minAnswerTextEnforced": false, "minAnswerTextSize": 15, "minFiles": 1, "maxFiles": 1, "maxFileSize": 512, "allowedFileTypes": [], "appendCantFindOption": false, "cardSortLabelConfig": 0, "customCardCatLabels": [], "cardSortLimitEnabled": false, "cardSortLimitMin": 1, "cardSortLimitMax": 0, "nestCategories": false, "requireAllCategoriesUsed": false, "categoriesLimitsEnabled": false, "catUsedLimitMax": 0, "catUsedLimitMin": 1, "preDefinedCategories": false, "canEditPredefinedCats": false, "iconFocusSize": 2, "iconFocusSizeCustomPx": 0, "catsPerRow": 33, "rowsPerHeader": 25, "displayNumRows": -1, "randomCardOrder": true, "complexQuotaProps": { "useScreenout": false, "useQuota": false, "quotaNum": 0 }, "allowEditingClosedCats": false, "tplId": null, "isValidation": true, "parentId": 1687373201560 } }, "postTask": {} }, "isSortable": true, "isDraggable": true, "isDeletable": true, "isEditable": true, "shownSection": "base", "name": "Regular", "text": "<p>Scroll and click \"Send\"</p>", "inTaskText": "", "inTaskTextLoc": "static", "url": "", "urlProtocol": 0, "taskType": 4, "useTextTask": false, "textTaskHideTimeout": 0, "validationType": 1, "validationUrls": [], "correctTreeNodes": [], "recGroupType": 4, "useEventRec": true, "useVideoRec": true, "webcamRecEnabled": false, "audioRecEnabled": false, "privateMode": false, "screenRecWidth": 1440, "webcamRecWidth": 320, "webcamPos": "br", "restrictRecToUrls": false, "allowedRecUrls": [], "startTaskWhenRecForbidden": false, "vidRecQuality": 1, "useLastUrl": false, "endTaskOnUrl": false, "endTaskUrls": [], "endTaskUrlMsg": "", "showEndTaskUrlMsg": false, "embedTaskWnd": false, "activeTreeId": "", "correctTreeNodeIds": [], "parentId": 0 }, "1687373264467": { "id": 1687373264467, "pos": 2, "nodeType": "task", "nodesets": { "validation": { "1687373268061": { "id": 1687373268061, "pos": 1, "nodeType": "ls-question", "nodesets": { "dimOneItems": {}, "dimTwoItems": {}, "dimThreeItems": {} }, "isEditable": true, "isDeletable": true, "isSortable": true, "isDraggable": true, "name": "ValidQ2", "qType": 4, "text": "", "isMandatory": true, "allowOther": false, "otherOptionText": "Other", "haveDefaults": false, "haveRandomOrder": false, "subqWidth": 0, "zeroBasedCodes": false, "useMinMax": false, "minValue": 1, "maxValue": 1, "ratingScaleMinText": "Strongly Disagree", "ratingScaleMaxText": "Strongly Agree", "pageBreakMode": 1, "useScreenout": false, "quotaMessage": "Thank you for your interest in taking our survey. Based on your response, you do not meet the qualifications for our survey.", "useQuotaCustomLimit": false, "customScrItems": [], "minAnswerTextEnforced": false, "minAnswerTextSize": 15, "minFiles": 1, "maxFiles": 1, "maxFileSize": 512, "allowedFileTypes": [], "appendCantFindOption": false, "cardSortLabelConfig": 0, "customCardCatLabels": [], "cardSortLimitEnabled": false, "cardSortLimitMin": 1, "cardSortLimitMax": 0, "nestCategories": false, "requireAllCategoriesUsed": false, "categoriesLimitsEnabled": false, "catUsedLimitMax": 0, "catUsedLimitMin": 1, "preDefinedCategories": false, "canEditPredefinedCats": false, "iconFocusSize": 2, "iconFocusSizeCustomPx": 0, "catsPerRow": 33, "rowsPerHeader": 25, "displayNumRows": -1, "randomCardOrder": true, "complexQuotaProps": { "useScreenout": false, "useQuota": false, "quotaNum": 0 }, "allowEditingClosedCats": false, "tplId": null, "isValidation": true, "parentId": 1687373264467 } }, "postTask": {} }, "isSortable": true, "isDraggable": true, "isDeletable": true, "isEditable": true, "shownSection": "base", "name": "ExtraLong", "text": "<p>Scroll and Click \"Walmart\"</p>", "inTaskText": "", "inTaskTextLoc": "static", "url": "", "urlProtocol": 0, "taskType": 4, "useTextTask": false, "textTaskHideTimeout": 0, "validationType": 1, "validationUrls": [], "correctTreeNodes": [], "recGroupType": 4, "useEventRec": true, "useVideoRec": true, "webcamRecEnabled": false, "audioRecEnabled": false, "privateMode": false, "screenRecWidth": 1440, "webcamRecWidth": 320, "webcamPos": "br", "restrictRecToUrls": false, "allowedRecUrls": [], "startTaskWhenRecForbidden": false, "vidRecQuality": 0, "useLastUrl": false, "endTaskOnUrl": false, "endTaskUrls": [], "endTaskUrlMsg": "", "showEndTaskUrlMsg": false, "embedTaskWnd": false, "activeTreeId": "", "correctTreeNodeIds": [], "parentId": 0 }, "1687373276864": { "id": 1687373276864, "pos": 3, "nodeType": "task", "nodesets": { "validation": { "1687373279474": { "id": 1687373279474, "pos": 1, "nodeType": "ls-question", "nodesets": { "dimOneItems": {}, "dimTwoItems": {}, "dimThreeItems": {} }, "isEditable": true, "isDeletable": true, "isSortable": true, "isDraggable": true, "name": "ValidQ3", "qType": 4, "text": "", "isMandatory": true, "allowOther": false, "otherOptionText": "Other", "haveDefaults": false, "haveRandomOrder": false, "subqWidth": 0, "zeroBasedCodes": false, "useMinMax": false, "minValue": 1, "maxValue": 1, "ratingScaleMinText": "Strongly Disagree", "ratingScaleMaxText": "Strongly Agree", "pageBreakMode": 1, "useScreenout": false, "quotaMessage": "Thank you for your interest in taking our survey. Based on your response, you do not meet the qualifications for our survey.", "useQuotaCustomLimit": false, "customScrItems": [], "minAnswerTextEnforced": false, "minAnswerTextSize": 15, "minFiles": 1, "maxFiles": 1, "maxFileSize": 512, "allowedFileTypes": [], "appendCantFindOption": false, "cardSortLabelConfig": 0, "customCardCatLabels": [], "cardSortLimitEnabled": false, "cardSortLimitMin": 1, "cardSortLimitMax": 0, "nestCategories": false, "requireAllCategoriesUsed": false, "categoriesLimitsEnabled": false, "catUsedLimitMax": 0, "catUsedLimitMin": 1, "preDefinedCategories": false, "canEditPredefinedCats": false, "iconFocusSize": 2, "iconFocusSizeCustomPx": 0, "catsPerRow": 33, "rowsPerHeader": 25, "displayNumRows": -1, "randomCardOrder": true, "complexQuotaProps": { "useScreenout": false, "useQuota": false, "quotaNum": 0 }, "allowEditingClosedCats": false, "tplId": null, "isValidation": true, "parentId": 1687373276864 } }, "postTask": {} }, "isSortable": true, "isDraggable": true, "isDeletable": true, "isEditable": true, "shownSection": "base", "name": "Wide", "text": "<p>Scroll and Click \"Red Dots\"</p>", "inTaskText": "", "inTaskTextLoc": "static", "url": "", "urlProtocol": 0, "taskType": 4, "useTextTask": false, "textTaskHideTimeout": 0, "validationType": 1, "validationUrls": [], "correctTreeNodes": [], "recGroupType": 4, "useEventRec": true, "useVideoRec": true, "webcamRecEnabled": false, "audioRecEnabled": false, "privateMode": false, "screenRecWidth": 1440, "webcamRecWidth": 320, "webcamPos": "br", "restrictRecToUrls": false, "allowedRecUrls": [], "startTaskWhenRecForbidden": false, "vidRecQuality": 0, "useLastUrl": false, "endTaskOnUrl": false, "endTaskUrls": [], "endTaskUrlMsg": "", "showEndTaskUrlMsg": false, "embedTaskWnd": false, "activeTreeId": "", "correctTreeNodeIds": [], "parentId": 0 } }, "poststudy": {} } }, "conditionTree": { "id": 0, "parentId": null, "pos": 1, "nodeType": "root", "name": "All Conditions", "nodesets": { "prestudy": {}, "conditions": {}, "poststudy": {} } }, "treeStructures": {}, "prevQsForFilter": [], "conditionFilters": { "filters": {}, "displayStrings": {}, "conditionAssignments": {} }, "questionFilters": { "filters": {}, "displayStrings": {}, "enabled": {} }, "groupFilters": { "filters": {}, "displayStrings": {}, "enabled": {} }, "taskFilters": { "filters": {}, "displayStrings": {}, "enabled": {} }, "filterLinkTable": {}, "entityLinks": { "tasks": {}, "preQuestions": {}, "postQuestions": {}, "postTask": {} }, "namingCounters": { "group": 1, "question": 0, "taskValidation": 3, "task": 3, "condition": 0 }, "studyDraftId": "126", "studyLsId": 614417, "studyTplId": 92, "studyPubId": "2848340", "isCloned": false, "isTplStudy": true, "studyImages": {}, "studyBackendState": 2, "defaultCardSortInstLabels": { "cardToSortHint": { "header": "Cards and Categories Hints", "title": "Cards to sort", "label": "Cards to sort", "longText": false }, "categoriesToUseHint": { "title": "Categories to use", "label": "Categories to use", "longText": false }, "remainingHint": { "title": "Remaining", "label": "remaining", "longText": false }, "anyCardsHint": { "title": "Sort Any Amount (cards) Hint", "label": "Any amount of cards can be sorted", "longText": true }, "anyCatsHint": { "title": "Use Any Amount (categories) Hint:", "label": "Any amount of categories can be used", "longText": true }, "allCatsHint": { "title": "Use All Categories Hint", "label": "All categories must be used", "longText": true }, "cardDropInstruction": { "header": "Help, Instructions and Headers", "title": "Card Drop Instruction", "label": "Please, drop your cards here", "longText": false }, "newCategoryOnCardDropInstruction": { "title": "New Category On Drop Instruction", "label": "New categories will be created automatically for each card dropped outside of existing category.", "longText": true }, "cardListHeader": { "title": "Card List Header", "label": "Card List", "longText": false }, "categoryListHeader": { "title": "Category List Header", "label": "Categories For Sorting", "longText": false }, "popupGeneralTitle": { "header": "Notifications and Popup Messages", "title": "General Popup Title", "label": "Information", "longText": false }, "savedMessageNotifier": { "title": "Saved Message Notification", "label": "Your card sorting answer was saved successfully.", "longText": false }, "cantAddCardPopup": { "title": "Cannot Add Card Popup", "label": "Max limit of sorted cards is already reached", "longText": false }, "cantAddCategoryPopup": { "title": "Cannot Add Category Popup", "label": "Max limit of categories used is already reached", "longText": false }, "cantDeleteNonEmptyCategoryPopup": { "title": "Cannot Delete Non-Empty Category Popup", "label": "Only an empty category can be deleted.", "longText": false }, "errorSavingDataTitle": { "title": "Error Saving Data Popup Title", "label": "Card Sorting Data Failed", "longText": false }, "errorSavingDataPopup": { "title": "Error Saving Data Popup Message", "label": "An error Occurred while saving card sorting data.", "longText": true }, "addNewCategoryBtn": { "header": "Button Labels", "title": "Add New Category Button", "label": "Add New Category", "longText": false }, "deleteAllCategoriesBtn": { "title": "Delete All Categories Button", "label": "Delete All Categories", "longText": false }, "deleteCategoryBtn": { "title": "Delete Category Button", "label": "Delete this category", "longText": false }, "resetCategoriesBtn": { "title": "Reset Button", "label": "Reset", "longText": false }, "validateSortMoreCards": { "header": "Sorting Validation Feedback", "title": "Sort More Cards Feedback", "label": "Minimum sorted cards not met. Please sort more cards.", "longText": true }, "validateUseMoreCats": { "title": "Use More Categories Feedback", "label": "Minimum used categories not met. Please use more categories.", "longText": true }, "validateCardsOutside": { "title": "Cards Sorted Outside of Categories Feedback", "label": "One or more cards were placed outside of categories. Please sort them to categories.", "longText": true }, "validateEmptyCats": { "title": "Empty Categories Feedback", "label": "One or more categories are empty. Please add cards to, or remove the empty categories", "longText": true }, "validateEmptyCatName": { "title": "Empty Category Name Feedback", "label": "One or more categories have an empty name. Please enter a name for all categories.", "longText": true }, "categoryPlaceholder": { "title": "New Category Label Placeholder", "label": "Enter a label", "longText": false }, "emptyCategoryLabel": { "title": "Empty Category Label Error Feedback", "label": "Label should not be empty", "longText": false } }, "defaultCardCatLabels": { "cardLabel": { "title": "Card Label Singular", "label": "card" }, "cardLabelPlural": { "title": "Card Label Plural", "label": "cards" }, "catLabel": { "title": "Category Label Singular", "label": "category" }, "catLabelPlural": { "title": "Category Label Plural", "label": "categories" } }, "dimOneItemLabels": { "2": { "singular": "List Option", "plural": "List Options" }, "3": { "singular": "List Option", "plural": "List Options" }, "4": { "singular": "List Option", "plural": "List Options" }, "5": { "singular": "List Option", "plural": "List Options" }, "6": { "singular": "Row", "plural": "Rows" }, "7": { "singular": "Row", "plural": "Rows" }, "8": { "singular": "Row", "plural": "Rows" }, "9": { "singular": "Row", "plural": "Rows" }, "10": { "singular": "Row", "plural": "Rows" }, "11": { "singular": "Row", "plural": "Rows" }, "12": { "singular": "Row", "plural": "Rows" }, "13": { "singular": "Row", "plural": "Rows" }, "14": { "singular": "Row", "plural": "Rows" }, "20": { "singular": "Row", "plural": "Rows" }, "21": { "singular": "Item for ranking", "plural": "Items for ranking" }, "27": { "singular": "Row", "plural": "Rows" }, "28": { "singular": "Checkbox", "plural": "Checkboxes" }, "29": { "singular": "Row", "plural": "Rows" }, "31": { "singular": "Row", "plural": "Rows" }, "32": { "singular": "Card", "plural": "Cards" } }, "dimTwoItemLabels": { "6": { "singular": "Column", "plural": "Columns" }, "10": { "singular": "Column", "plural": "Columns" }, "11": { "singular": "Column", "plural": "Columns" }, "13": { "singular": "Column", "plural": "Columns" }, "14": { "singular": "Scale 1 Option", "plural": "Scale 1 Options" }, "30": { "singular": "Rating", "plural": "Ratings" }, "31": { "singular": "Rating", "plural": "Ratings" }, "32": { "singular": "Category", "plural": "Categories" } }, "dimThreeItemLabels": { "14": { "singular": "Scale 2 Option", "plural": "Scale 2 Options" } }, "questionTypeDefs": { "2": { "label": "<span class=\"lsq-adder__drop-link far fa-caret-square-down\"></span> Dropdown List", "name": "ListDropdown", "order": 6 }, "4": { "label": "<span class=\"lsq-adder__drop-link far fa-dot-circle\"></span> Multiple Choice", "name": "List", "order": 0 }, "6": { "label": "<span class=\"lsq-adder__drop-link fas fa-th\"></span> Multiple Choice Grid", "name": "Array", "order": 3 }, "15": { "label": "<span class=\"lsq-adder__drop-link fas fa-calendar-day\"></span> Date/Time", "name": "Date", "order": 13 }, "17": { "label": "<span class=\"lsq-adder__drop-link fas fa-upload\"></span> File Upload", "name": "File", "order": 14 }, "19": { "label": "<span class=\"lsq-adder__drop-link fas fa-calculator\"></span> Numerical Input", "name": "NumInput", "order": 12 }, "21": { "label": "<span class=\"lsq-adder__drop-link fas fa-random\"></span> Ranking", "name": "Ranking", "order": 7 }, "22": { "label": "<span class=\"lsq-adder__drop-link fas fa-info-circle\"></span> Text Display", "name": "TextDisplay", "order": 17 }, "23": { "label": "<span class=\"lsq-adder__drop-link fas fa-thumbs-up\"></span> Yes/No", "name": "YesNo", "order": 15 }, "24": { "label": "<span class=\"lsq-adder__drop-link fas fa-i-cursor\"></span> Short Answer", "name": "ShortText", "order": 9 }, "25": { "label": "<span class=\"lsq-adder__drop-link fas fa-align-left\"></span> Paragraph", "name": "LongText", "order": 10 }, "27": { "label": "<span class=\"lsq-adder__drop-link fas fa-list\"></span> Short Answer Form", "name": "MultiShortText", "order": 11 }, "28": { "label": "<span class=\"lsq-adder__drop-link fas fa-check-square\"></span> Checkboxes", "name": "MultiChoice", "order": 1 }, "30": { "label": "<span class=\"lsq-adder__drop-link fas fa-sort-numeric-down\"></span> Rating Scale", "name": "RatingScale", "order": 2 }, "31": { "label": "<span class=\"lsq-adder__drop-link fas fa-th\"></span> Rating Scale Grid", "name": "ArrayRating", "order": 4 }, "32": { "label": "<span class=\"lsq-adder__drop-link far fa-clone\"></span> Card Sort", "name": "CardSort", "order": 8 }, "34": { "label": "<span class=\"lsq-adder__drop-link fas fa-filter\"></span> Complex Quota", "name": "ComplexQuota", "order": 16 } }, "inTaskTextLocStates": { "static": { "id": "static", "markup": "Locked to Bottom" }, "bl": { "id": "bl", "markup": "Bottom Left Corner" }, "bc": { "id": "bc", "markup": "Bottom Center" }, "br": { "id": "br", "markup": "Bottom Right Corner" }, "ml": { "id": "ml", "markup": "Middle Left" }, "mc": { "id": "mc", "markup": "Centered" }, "mr": { "id": "mr", "markup": "Middle Right" }, "tl": { "id": "tl", "markup": "Top Left Corner" }, "tc": { "id": "tc", "markup": "Top Center" }, "tr": { "id": "tr", "markup": "Top Right Corner" } }, "activeEditEntity": null, "activeEditedTreeStructures": [], "activeEditTreeStructuresBackup": [], "activeEditEntityBackups": {}, "activeEditFilterBackups": { "questionFilters": null, "groupFilters": null, "conditionFilters": null, "taskFilters": null }, "activeEditEntityLinkBackups": null, "editLogTemplate": { "entities": {}, "filterCopies": { "questionFilters": { "edited": { "filters": {}, "displayStrings": {}, "enabled": {} }, "original": { "filters": {}, "displayStrings": {}, "enabled": {} } }, "taskFilters": { "edited": { "filters": {}, "displayStrings": {}, "enabled": {} }, "original": { "filters": {}, "displayStrings": {}, "enabled": {} } }, "groupFilters": { "edited": { "filters": {}, "displayStrings": {}, "enabled": {} }, "original": { "filters": {}, "displayStrings": {}, "enabled": {} } }, "conditionFilters": { "edited": { "filters": {}, "displayStrings": {}, "conditionAssignments": {} }, "original": { "filters": {}, "displayStrings": {}, "conditionAssignments": {} } } }, "studySettings": {} }, "studyNeedsBuild": false }, "draftUpdatedAt": "2023-06-21 15:45:52" }; var testCopy = null; var deepClone = function(obj) { var out; if (Array.isArray(obj)) { out = []; for (var index = 0; index < obj.length; ++index) { let subArray = obj[index]; out.push((subArray === null) ? subArray : (subArray instanceof Date) ? new Date(subArray.valueOf()) : (typeof subArray === 'object') ? deepClone(subArray) : subArray); } } else { out = {}; for (var key in obj) { var subObject = obj[key]; out[key] = subObject === null ? subObject : subObject instanceof Date ? new Date(subObject.valueOf()) : (typeof subObject === 'object') ? deepClone(subObject) : subObject; } } return out; };
Tests:
Lodash cloneDeep
testCopy = _.cloneDeep(testArray);
Native JSON parse
testCopy = JSON.parse(JSON.stringify(testArray));
Recursive deep clone
testCopy = deepClone(testArray);
Object.assign shallow clone
testCopy = Object.assign([...testArray]);
structuredClone
testCopy = structuredClone(testArray);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (5)
Previous results
Fork
Test case name
Result
Lodash cloneDeep
Native JSON parse
Recursive deep clone
Object.assign shallow clone
structuredClone
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
It seems like you're providing a test framework benchmarking data for various cloning libraries, including Lodash's `cloneDeep`, native JSON parsing, recursive deep cloning using the `deepClone` function, Object.assign shallow cloning, and structured cloning. To provide an answer, I'll need to analyze the provided data and determine the best-performing library or implementation based on the benchmark results. Here are my observations: 1. **Native JSON Parse**: The native JSON parsing method appears to be the fastest, with an average execution speed of approximately 4170 executions per second. 2. **structuredClone**: This method is relatively fast, with an average execution speed of around 2941 executions per second. 3. **Recursive Deep Clone (deepClone)**: The recursive deep cloning implementation takes significantly longer than the native JSON parsing and structured cloning methods, averaging approximately 3451 executions per second. Based on these results, it seems that the most efficient approach for cloning complex objects is using the native JSON parsing method or structured cloning, both of which outperform the recursive deep clone implementation.
Related benchmarks:
Lodash cloneDeep vs best native cloneDeep option
Lodash cloneDeep vs native cloneDeep vs dom cloneDeep
Lodash cloneDeep vs native cloneDeep (copy object)
Lodash cloneDeep vs native cloneDeep (copy object2)
Lodash cloneDeep vs native cloneDeep (copy object5)
Comments
Confirm delete:
Do you really want to delete benchmark?