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: Eli Zaretskii
Subject: Re: [PATCH] Implement fast verisons of json-parse functions
Date: Sat, 23 Mar 2024 13:11:40 +0200

> From: Herman, Géza <geza.herman@gmail.com>
> Cc: Géza Herman <geza.herman@gmail.com>,
>  emacs-devel@gnu.org
> 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?

We install the new parser, and wait for complaints about it that could
justify letting people optionally use libjansson.  Like performance
problems that only happen sometimes and cannot be fixed in the new
parser, or some other similar issues.  If and when such complaints
come up, we consider the possibility of leaving libjansson-based
parser in our sources.

> 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.

Thanks.  I'll wait for a few days before installing this, in case
there are objections or further comments.



reply via email to

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