Instaparse

Author: p | 2025-04-25

★★★★☆ (4.8 / 3478 reviews)

dx ball online

Instaparse Demo This is the code from my presentation on Instaparse at the Friendly Functional Programming Meetup . To play with Instaparse in your browser I recommend Instaparse Live . Instaparse Demo This is the code from my presentation on Instaparse at the Friendly Functional Programming Meetup . To play with Instaparse in your browser I recommend Instaparse Live .

amplitube max

[instaparse/instaparse 1.5.0 ] - Clojars

I'm hoping someone might have some insight on a major problem we're having with Alda, which relies on instaparse: alda-lang/alda#266 In testing, I believe some part of instaparse may be the culprit.To summarize: we are forking 4 worker processes upon startup of an Alda server. For about 10-15 seconds during startup, we're seeing the CPU usage of all 4 worker processes spike dramatically (~150-200% CPU on my 2014 Macbook), before decreasing down to about 2-3% and staying there.The problem is difficult to profile mostly because I'm bad at profiling 😅 (I fumbled with jvisualvm and couldn't find an answer), but also because the CPU spike occurs only briefly while the Alda worker processes are starting up -- it's not like the CPU is just staying elevated and I can grab the top CPU consuming thread from the thread dump and see what it is.So, in lieu of proper profiling, I've started experimenting with commenting out code and observing the CPU usage.I was able to put together this base case which shows that requiring the instaparse.core namespace causes the spike: the example above, the instaparse require is commented out -- to reproduce, uncomment it and comment out the taoensso.encore require.)Requiring other namespaces (with the exception of timbre/encore) does not have the same effect.I spent a little time building instaparse locally and commenting out parts of instaparse.core, and it looks like at least one source of CPU spiking is in instaparse.gll, but I couldn't dig much deeper without going down a major rabbit hole. Is anyone aware of any potential sources of heavy CPU usage in the instaparse codebase? (Or, would someone with profiling experience be willing to take a look?)Any help is appreciated!. Instaparse Demo This is the code from my presentation on Instaparse at the Friendly Functional Programming Meetup . To play with Instaparse in your browser I recommend Instaparse Live . Instaparse Demo This is the code from my presentation on Instaparse at the Friendly Functional Programming Meetup . To play with Instaparse in your browser I recommend Instaparse Live . Build a parser in your browser! Read the Instaparse docs to get started.thanks to instaparse instaparse-cljs! Build a parser in your browser! Read the Instaparse docs to get started.thanks to instaparse instaparse-cljs!

Comments

User1742

I'm hoping someone might have some insight on a major problem we're having with Alda, which relies on instaparse: alda-lang/alda#266 In testing, I believe some part of instaparse may be the culprit.To summarize: we are forking 4 worker processes upon startup of an Alda server. For about 10-15 seconds during startup, we're seeing the CPU usage of all 4 worker processes spike dramatically (~150-200% CPU on my 2014 Macbook), before decreasing down to about 2-3% and staying there.The problem is difficult to profile mostly because I'm bad at profiling 😅 (I fumbled with jvisualvm and couldn't find an answer), but also because the CPU spike occurs only briefly while the Alda worker processes are starting up -- it's not like the CPU is just staying elevated and I can grab the top CPU consuming thread from the thread dump and see what it is.So, in lieu of proper profiling, I've started experimenting with commenting out code and observing the CPU usage.I was able to put together this base case which shows that requiring the instaparse.core namespace causes the spike: the example above, the instaparse require is commented out -- to reproduce, uncomment it and comment out the taoensso.encore require.)Requiring other namespaces (with the exception of timbre/encore) does not have the same effect.I spent a little time building instaparse locally and commenting out parts of instaparse.core, and it looks like at least one source of CPU spiking is in instaparse.gll, but I couldn't dig much deeper without going down a major rabbit hole. Is anyone aware of any potential sources of heavy CPU usage in the instaparse codebase? (Or, would someone with profiling experience be willing to take a look?)Any help is appreciated!

2025-04-23

Add Comment