diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-06-18 18:16:10 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-06-19 16:18:58 -0400 |
commit | 833b500a0e788a95c189a5b2bfa95494a3a7429e (patch) | |
tree | f11074d7c78cf391a15f406ab17cea91968499ef /lisp/emacs-lisp/byte-run.el | |
parent | ee309f77543ac53e407a4b3ca7001bc920099d1b (diff) | |
download | emacs-833b500a0e788a95c189a5b2bfa95494a3a7429e.tar.gz emacs-833b500a0e788a95c189a5b2bfa95494a3a7429e.tar.bz2 emacs-833b500a0e788a95c189a5b2bfa95494a3a7429e.zip |
editorconfig-core-handle.el: Reduce allocation in parser
* lisp/editorconfig-core-handle.el (editorconfig-core-handle--parse-file):
Return a `editorconfig-core-handle`.
(editorconfig-core-handle): Simplify accordingly.
(editorconfig-core-handle--parse-file): Push `sections` and `props`
in reverse order to avoid the usual O(N²) complexity.
Work directly in the buffer instead of extracting "lines" from it, so
as to reduce memory allocation. Similarly, use careful regexps so we
can extract trimmed strings without an explicit trim operation.
Use `eobp`.
(editorconfig-core-handle--string-trim): Delete function, not used any more.
Diffstat (limited to 'lisp/emacs-lisp/byte-run.el')
0 files changed, 0 insertions, 0 deletions