Skip to content

Fix Maximum call stack size exceeded error in grid aggregator - #868

Merged
ibgreen merged 3 commits into
masterfrom
fix-max-call
Aug 22, 2017
Merged

ibgreen merged 3 commits into
masterfrom
fix-max-call

Conversation

@heshan0131

Copy link
Copy Markdown
Collaborator

No description provided.

@heshan0131 heshan0131 added the P0 label Aug 21, 2017
@heshan0131

Copy link
Copy Markdown
Collaborator Author

#866 #793

const screenPoints = data.map(pt => Object.assign({
screenCoord: viewport.projectFlat(getPosition(pt))
}, pt));
for (let i = 0; i < data.length; i++) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think it is the apply that is the issue, not the map call.

The map might actually be faster than the repeated pushes as it can allocate the return array to the right size from the start.

@heshan0131 heshan0131 changed the title Fix Maximum call stack size exceeded error in grid and hexagon aggreg… Fix Maximum call stack size exceeded error in grid aggregator Aug 21, 2017
@1chandu

1chandu commented Aug 22, 2017

Copy link
Copy Markdown
Contributor

@heshan0131 , are there any pending changes for this, can we merge?

@heshan0131

Copy link
Copy Markdown
Collaborator Author

@ib, yes it can be merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants