Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

General Performance Improvements#24

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@thecoolwinter
Copy link
Contributor

@thecoolwinterthecoolwinter commentedFeb 21, 2024
edited
Loading

Description

  • Updates thelayoutManager.endTransaction method to only force layout if determined to be necessary by the caller, dramatically reducing the number of times complete layout occurs.
  • Cleans up thehitTest method onTextView to just returnself if the hit is in the visible rect (was taking 100's of ms to perform before).
  • Adds 350px of padding to the layout method inTextLayoutManager. This fixes a small visible bug where scrolling very fast would briefly lag behind on layout and lines would not be rendered immediately. With this change, the lag still occurs but it happens invisibly to the user.

For the last point, it was determined that the slowest part of the layout process is actually removing line fragment views from the hierarchy. Other methods were explored such as hiding views or setting their frame to 0 in place of removing them, but similar performance hits occurred.

Related Issues

  • N/S

Checklist

  • I read and understood thecontributing guide as well as thecode of conduct
  • The issues this PR addresses are related to each other
  • My changes generate no new warnings
  • My code builds and runs on my machine
  • My changes are all related to the related issue above
  • I documented my code

@thecoolwinterthecoolwinter changed the titleGeneral PerformanceGeneral Performance ImprovementsFeb 21, 2024
@thecoolwinterthecoolwinter merged commit7d2412c intoCodeEditApp:mainFeb 21, 2024
@thecoolwinterthecoolwinter deleted the fix/scroll-layout-performance branchFebruary 21, 2024 18:28
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@austincondiffaustincondiffaustincondiff approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@thecoolwinter@austincondiff

[8]ページ先頭

©2009-2025 Movatter.jp