{"action":"created","issue":{"url":"https://api.github.com/repos/davidkpiano/react-redux-form/issues/499","repository_url":"https://api.github.com/repos/davidkpiano/react-redux-form","labels_url":"https://api.github.com/repos/davidkpiano/react-redux-form/issues/499/labels{/name}","comments_url":"https://api.github.com/repos/davidkpiano/react-redux-form/issues/499/comments","events_url":"https://api.github.com/repos/davidkpiano/react-redux-form/issues/499/events","html_url":"https://github.com/davidkpiano/react-redux-form/issues/499","id":185584400,"number":499,"title":"getFormStateKey causing major performance issues.","user":{"login":"MrBlenny","id":9685048,"avatar_url":"https://avatars.githubusercontent.com/u/9685048?v=3","gravatar_id":"","url":"https://api.github.com/users/MrBlenny","html_url":"https://github.com/MrBlenny","followers_url":"https://api.github.com/users/MrBlenny/followers","following_url":"https://api.github.com/users/MrBlenny/following{/other_user}","gists_url":"https://api.github.com/users/MrBlenny/gists{/gist_id}","starred_url":"https://api.github.com/users/MrBlenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrBlenny/subscriptions","organizations_url":"https://api.github.com/users/MrBlenny/orgs","repos_url":"https://api.github.com/users/MrBlenny/repos","events_url":"https://api.github.com/users/MrBlenny/events{/privacy}","received_events_url":"https://api.github.com/users/MrBlenny/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-27T06:34:27Z","updated_at":"2016-10-28T01:29:46Z","closed_at":null,"body":"the `getFormStateKey` function in `get-form.js` is causing major performance issues for me (v1.0.8)\r\n\r\n![example](https://i.imgur.com/SqIfdCH.png)\r\n\r\nThat is 7 seconds or processing. When I refresh my app it is called a grand total of 18,401 times (I've got about 20 checkboxes and 3 inputs on the page).\r\n\r\nI'm not quite sure why it is being called so many times - I assume it is the result of having a deeply nested state (at most [8 layers](https://i.imgur.com/4y7bN66.png)) and doing some weird recursion.\r\n\r\nAny idea why this is happening? Or, debugging tips?"},"comment":{"url":"https://api.github.com/repos/davidkpiano/react-redux-form/issues/comments/256814501","html_url":"https://github.com/davidkpiano/react-redux-form/issues/499#issuecomment-256814501","issue_url":"https://api.github.com/repos/davidkpiano/react-redux-form/issues/499","id":256814501,"user":{"login":"MrBlenny","id":9685048,"avatar_url":"https://avatars.githubusercontent.com/u/9685048?v=3","gravatar_id":"","url":"https://api.github.com/users/MrBlenny","html_url":"https://github.com/MrBlenny","followers_url":"https://api.github.com/users/MrBlenny/followers","following_url":"https://api.github.com/users/MrBlenny/following{/other_user}","gists_url":"https://api.github.com/users/MrBlenny/gists{/gist_id}","starred_url":"https://api.github.com/users/MrBlenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrBlenny/subscriptions","organizations_url":"https://api.github.com/users/MrBlenny/orgs","repos_url":"https://api.github.com/users/MrBlenny/repos","events_url":"https://api.github.com/users/MrBlenny/events{/privacy}","received_events_url":"https://api.github.com/users/MrBlenny/received_events","type":"User","site_admin":false},"created_at":"2016-10-28T01:29:46Z","updated_at":"2016-10-28T01:29:46Z","body":"I've updated to `1.0.14` but the issue is still there.\r\n\r\nDo you have any idea what part of the store would be causing the issue (middleware/store-structure/reducers etc)? This is part of a multi-window electron application so it is hard to share the code unless I know what section could be causing the issue.\r\n\r\nHere is a more detailed CPU profile:\r\n\r\n![example](https://i.imgur.com/q7s43ov.png)\r\n\r\nThe store state tree looks something like:\r\n\r\n![state tree](https://i.imgur.com/4y7bN66.png)\r\n\r\nStore config:\r\n```\r\nimport { createStore, applyMiddleware, compose } from 'redux';\r\nimport thunk from 'redux-thunk';\r\nimport promise from 'redux-promise-middleware';\r\nimport createLogger from 'redux-logger';\r\nimport { hashHistory } from 'react-router';\r\nimport { routerMiddleware } from 'react-router-redux';\r\nimport getRootReducerRenderer from '../reducers/rootReducer.renderer.js';\r\nimport forwardToMain from './middleware/forwardToMain';\r\nimport forwardToRendererWindow from './middleware/forwardToRendererWindow';\r\nimport routerFix from './middleware/routerFix';\r\n\r\nexport default function configureStore(initialState) {\r\n  const middleware =[\r\n    thunk,\r\n    promise(),\r\n    routerFix,\r\n    forwardToMain,\r\n    forwardToRendererWindow,\r\n    routerMiddleware(hashHistory),\r\n  ];\r\n  if(process.env.NODE_ENV == 'development') {\r\n     middleware.push(createLogger({\r\n      level: 'info',\r\n      collapsed: true,\r\n    }));\r\n  }\r\n  const enhanced = [applyMiddleware(...middleware)];\r\n  enhanced.push(window.devToolsExtension ? window.devToolsExtension() : noop => noop);\r\n  const rootReducer = getRootReducerRenderer();\r\n  const enhancer    = compose(...enhanced);\r\n  const store       = createStore(rootReducer, initialState, enhancer);\r\n\r\n  if (!process.env.NODE_ENV && module.hot) {\r\n    module.hot.accept('../reducers', () => {\r\n      store.replaceReducer(require('../reducers'));\r\n    });\r\n  }\r\n\r\n  return store;\r\n}\r\n```\r\n"}}
{"actor":{"display_login":"MrBlenny"}}