summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2024-06-18 18:16:10 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2024-06-19 16:18:58 -0400
commit833b500a0e788a95c189a5b2bfa95494a3a7429e (patch)
treef11074d7c78cf391a15f406ab17cea91968499ef /lisp/emacs-lisp
parentee309f77543ac53e407a4b3ca7001bc920099d1b (diff)
downloademacs-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')
0 files changed, 0 insertions, 0 deletions