Skip to content

Conversation

@benoit-pierre
Copy link
Member

@benoit-pierre benoit-pierre commented Jun 21, 2021

Summary of changes

The next version of plover_stroke (1.0.0) has been rewritten to use a CPython extension, making it possible to use it for the steno module implementation without negatively impacting the performance (particularly loading times).

Pros:

  • one consistent implementation: same behavior (including normalization) for steno.Stroke, normalize_steno, and plover_build_utils.testing.steno_to_stroke
  • better steno normalization (see tests), including detection of invalid strokes (used by the "add translation" dialog and dictionary editor to prevent adding invalid mappings)
  • new steno_to_sort_key for sorting on steno order (used by the dictionary editor)
  • slightly faster loading times (~1.5 faster at loading main.json)

Cons:

  • plover_stroke support a maximum of 63 keys
  • using a CPython extension means no universal wheel for plover_stroke (but binary wheels for common platforms / Python versions are provided)
  • sorting on steno order is slower than the standard string sort

TODO:

Pull Request Checklist

  • Changes have tests
  • News fragment added in news.d. See documentation for details

@benoit-pierre
Copy link
Member Author

I think this take care of #672.

@benoit-pierre benoit-pierre force-pushed the use_plover_stroke branch 2 times, most recently from f68358d to cb6e07f Compare June 21, 2021 23:10
@panathea
Copy link
Member

panathea commented Oct 9, 2021

Looks good to me!

@benoit-pierre benoit-pierre merged commit c34febf into opensteno:master Oct 10, 2021
@benoit-pierre benoit-pierre deleted the use_plover_stroke branch October 10, 2021 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants