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

Slow transaction list retrieval #3

Open
ldgrp opened this issue Mar 28, 2021 · 0 comments
Open

Slow transaction list retrieval #3

ldgrp opened this issue Mar 28, 2021 · 0 comments

Comments

@ldgrp
Copy link
Owner

ldgrp commented Mar 28, 2021

up-bank-api has to retrieve the full transaction list before it is available.

unpaginate returns an m [[a]] where m is often the ClientM monad from Servant.Client.Internal.HttpClient

This can be interpreted as returning a list of "chunks" which can later be concatenated to form the whole result. An incorrect assumption was made that this IO lists are lazy.

Use a streaming library.

https://stackoverflow.com/questions/32489732/lazy-list-wrapped-in-io
https://stackoverflow.com/questions/5892653/whats-so-bad-about-lazy-i-o
https://stackoverflow.com/questions/7191058/truly-lazy-io-in-haskell
https://stackoverflow.com/questions/32151151/haskell-api-client-pagination

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