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

* Optimize SourceBuffer line and column handling #755

Merged
merged 2 commits into from Oct 28, 2020

Commits on Oct 28, 2020

  1. Test out of bounds

    marcandre committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    9aeabf9 View commit details
    Browse the repository at this point in the history
  2. * Optimize SourceBuffer line and column handling (memory and perfor…

    …mance)
    
    `#line_begins`:
    - store `line_begin` instead of `[line_begin, index]`
    - simplify code by storing an additional "virtual" line_begin at the end
    
    caches for `position` => line / column: Use same cache instead of two.
    
    `#decompose_position`: use cache there too
    
    I added tests for behavior of some methods with out-of-range arguments.
    Behavior arguably less bad.
    marcandre committed Oct 28, 2020
    Configuration menu
    Copy the full SHA
    7c4c448 View commit details
    Browse the repository at this point in the history