gyscos / gyscos/cursive

[BUG] Views not visible (or hidden) slow ScrollView down significantly

Open
#698 4 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Rust
Stars
4.8k
Forks
270
Avg merge
5d 19h
Merged PRs (30d)
2

Description

**Describe the bug**
I think ScrollView slows down exponentially based on the content inside, even if that content isn't visible, or is hidden.

**To Reproduce**
I have this layout hierarchy right now (naming excluded):
```
> ResizedView
> LinearLayout
> PaddedView (header)
> TextView
> HideableView (hidden)
> ScrollView
> DebugView
> HideableView (hidden)
> ScrollView
> LoggerView
> ResizedView
> AlignedView
> ScrollView
> LinearLayout
> PaddedView
> TextView
** Repeating element **
> LinearLayout (one section containing a title and a list of (expandable) items)
> TextView (section header basically)
> HideableView (might be hidden)
> ScrollView
> ListView
> TextView
** Repeating element **
> PaddedView (footer)
> TextView
```

**Expected behavior**
Faster draws if only 40 lines of text are actually displayed, and approximately 1000 in all the visible views.

**Environment**
* Operating system used: `Ubuntu 22.04`
* Backend used: `crossterm`
* Current locale: `en_GB.UTF-8`
* Cursive version: `0.20.0` (crates.io)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.