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

explore feels slow in big tables #26

Open
amtoine opened this issue Sep 4, 2023 · 1 comment
Open

explore feels slow in big tables #26

amtoine opened this issue Sep 4, 2023 · 1 comment
Labels
bug Something isn't working performance

Comments

@amtoine
Copy link
Owner

amtoine commented Sep 4, 2023

i think the TUI renders every row of the data, even if it's out of the screen 🤔

this means that a table with 15000 rows will feel much slower than the first 100 lines of the same table.

@amtoine amtoine added bug Something isn't working performance labels Sep 4, 2023
@amtoine
Copy link
Owner Author

amtoine commented Sep 4, 2023

if the history is big enough, one can compare

open $nu.history-path | query db "SELECT * from history" | first 20000 | explore

and

open $nu.history-path | query db "SELECT * from history" | first 200 | explore

alternately, one can use the following command to generate a dummy table of a certain length

def t [n: int] {
    let ids = seq 1 $n | each { random uuid } | wrap id
    let names = seq 1 $n | each { random chars --length 64 } | wrap name
    let vals = seq 1 $n | each { random int } | wrap val

    $ids | merge $names | merge $vals
}

it starts to feel slightly slow with t 10_000, and it gets worse with t 20_000 and t 30_000 freezes.

Note

also works with seq 1 $n with $n = 10^{5}$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working performance
Projects
None yet
Development

No branches or pull requests

1 participant