emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Implement fast verisons of json-parse functions


From: Herman , Géza
Subject: Re: [PATCH] Implement fast verisons of json-parse functions
Date: Sat, 23 Mar 2024 11:40:41 +0100


Eli Zaretskii <eliz@gnu.org> writes:

If we want to have conditional compilation, is there a simple
similar conditional compilation case already in Emacs? So I can
copy the approach easily (supposedly I need to add a flag to
configure, it needs to add a -DUSE_OWN_JSON_PARSER switch to the
compiller, etc.)

Let's wait with this until we have a clear idea whether we need this. My suggestion was just to present a possibility, not necessarily a decision that we should have this. I'm not sure yet whether we need to offer the possibility of using libjansson for parsing JSON as an
option.

What is the process for deciding this?

I attached the latest version of the parser. I reverted the Lisp vector based workspace to use a malloc based one, and added a note regarding that the GC most not run during parsing. I also implemented some additional optimizations, this version runs ~10x faster on my LSP dataset. I also run the parser on all the JSON files I found on my computer (~60,000 files, 1.5 GiB), no problems were found. The parser runs ~6.5x faster (3.5 sec vs 23.4 sec) on this dataset.

Attachment: 0001-replace-jansson-parser-with-a-custom-one.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]