Skip to content
This repository has been archived by the owner on Feb 2, 2021. It is now read-only.

Leaked events, cause Maximum call stack with Mouse Position behavior #42

Open
hgiasac opened this issue Oct 14, 2018 · 0 comments
Open

Comments

@hgiasac
Copy link

hgiasac commented Oct 14, 2018

Since version 7.0, native events have been replaced by FRP Event, which is somewhat too heavy weight for continuous ones such as mouse position event.

Let's begin with buttons example:
http://try.purescript.org/?backend=behaviors&gist=53e36cc4956cc67e684dd6c48b778385

Before version 7.0, we can render more than 100 buttons without lagging. Now the performance is every bad with 6 buttons, and cause Maximum call stack error with 10 buttons.

From what I check in debug log, the issue may be in traversable
buttons = traverse toButton (0..9)
In expectation, each button is subscribed once, 10 buttons produce 10 behavior events. But in debug, the more buttons are created, the more duplicated subscriptions. With 5 buttons, there are about 100 created events. It is the nightmare because of resource leaking

I don't know if this is a bug, or there is another solution for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant