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

last changes feature in field hub: slider lags #267

Open
lsteinmann opened this issue Dec 17, 2024 · 4 comments
Open

last changes feature in field hub: slider lags #267

lsteinmann opened this issue Dec 17, 2024 · 4 comments
Assignees
Labels
bug elixir Tickets concerning Elixir Code, https://elixir-lang.org/ field_hub Issue concerning the Hub server

Comments

@lsteinmann
Copy link
Member

I think the slider for setting the amount of last changes could use a delay in evaluation (if that is the problem here): it gets slow-ish and lags a bit, when you slide it from 10 to 100. I assume it starts evaluating immediately when the value changes (but I did not check, so correct me if that's wrong) - is there a way to add a debounce in elixir? Maybe delaying evaluation for 3 secs would do the trick.

@lsteinmann lsteinmann added the bug label Dec 17, 2024
@lsteinmann lsteinmann added field_hub Issue concerning the Hub server elixir Tickets concerning Elixir Code, https://elixir-lang.org/ labels Dec 17, 2024
@dersmon
Copy link
Member

dersmon commented Dec 17, 2024

Currently the server makes a complete roundtrip to the database to evaluate the n changes. Makes probably more sense to load the maximum once at the beginning and use the selected n to trim down that list.

@lsteinmann
Copy link
Member Author

Which has the (honestly tiny) downside of not updating the changes without reloading the page. So probably Simons idea is the most efficient solution.

@dersmon
Copy link
Member

dersmon commented Dec 18, 2024

The view is actually polling regularly anyway.

I think there is even a continuous update stream in CouchDB, but that would require some additional rewrites in the CouchService module.

@lsteinmann
Copy link
Member Author

Continuous would obviously be cool, but for now you first solution seems more appropriate (and faster to do, anyway). What do you guys think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug elixir Tickets concerning Elixir Code, https://elixir-lang.org/ field_hub Issue concerning the Hub server
Projects
None yet
Development

No branches or pull requests

3 participants