Skip to content

Commit

Permalink
Merge pull request #113 from dbcls/fix/performance
Browse files Browse the repository at this point in the history
エンティティ数フィルターが遅い問題を修正
  • Loading branch information
sasaujp authored Feb 2, 2021
2 parents d38f6ab + 93e1fc4 commit 0e6fdfd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions node/src/ts/visualizer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,13 @@ const App: React.FC<AppProps> = (props) => {
classDetail.entities < lowerLimitOfClassEntities)
)
})
.map((elem) => elem.uri)
.reduce<{ [key: string]: true }>((prev, cur) => {
// eslint-disable-next-line no-param-reassign
prev[cur.uri] = true
return prev
}, {})

const shouldHideElement = (uri: string) => urisToHide.includes(uri)
const shouldHideElement = (uri: string) => urisToHide[uri]
const nextState = _.cloneDeep(rawState)
filterContent(nextState, shouldHideElement)
setState(nextState)
Expand Down

0 comments on commit 0e6fdfd

Please sign in to comment.