Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jsaddle-warp performance with massive arrays (length == 518400) #134

Open
augyg opened this issue Nov 21, 2022 · 0 comments
Open

jsaddle-warp performance with massive arrays (length == 518400) #134

augyg opened this issue Nov 21, 2022 · 0 comments

Comments

@augyg
Copy link

augyg commented Nov 21, 2022

https://developer.mozilla.org/en-US/docs/Web/Guide/Audio_and_video_manipulation

I am currently trying to recreate this tutorial in jsaddle-warp (via obelisk ~~> reflex) and have the line

data' :: Maybe [Int] <- fromJSVal =<< frame ^. js "data" -- frame.data :: Array
liftIO $ print data'

And this works beautifully when compiled with GHCJS but takes over 5 minutes and destroys the entire DOM on jsaddle-warp. **Is there some way to work with massive arrays that is performant on all runners?

I know I could I just do an eval statement but would mainly just like to know the best way to work with massive arrays (this being of length 518400). I also noticed that there isn't a method to update an Array A, at index I.

NOTE: a simple shrug that I'm on my own here would suffice, but hey might as well ask.

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

No branches or pull requests

1 participant