GithubHelp home page GithubHelp logo

Question about performance about bblfshd HOT 8 CLOSED

smacker avatar smacker commented on July 19, 2024
Question about performance

from bblfshd.

Comments (8)

juanjux avatar juanjux commented on July 19, 2024 1

Some ideas for that OSD:

  • Benchmark also against connecting directly to the driver via gRPC (just run the driver image and connect to it, it speaks the same protocol as the server). This will give the load bblfshd adds.

  • Benchmark the Python, Java and Scala drivers with files of more or less the same complexity.

  • Hack the native drivers a little for them do to their parse in a loop without any gRPC calling.

  • Compare the speed of Parse vs ParseNative. This would give the load added by the annotating process.

I can help you with this that OSD day.

from bblfshd.

juanjux avatar juanjux commented on July 19, 2024

The native parse is implemented in pure C. The non native parse must do a second pass to add missing positions (the ones we can), comments, et cetera, so it's much slower. Then you need to add the protocol round trip, once for the client to the server and another one from the server to the driver... you get the picture. Still, at some point we should need to benchmark every part and find fixable bottlenecks.

from bblfshd.

smacker avatar smacker commented on July 19, 2024

Thank you for replay. I perfectly understand why it’s slower.
My question is: do you have performance improvements in roadmap? If not, will you be open to pull requests with profiling/benchmarks/optimizations?

I’m sorry if it wasn’t clear from my first message.

from bblfshd.

mcuadros avatar mcuadros commented on July 19, 2024

We never get focused on performance, the last improvements we did were focused on resilience.

Said this, as @juanjux explained, what you are obtaining from the python AST is not the same information you get from the bblfshd server. Also, you executed this on linux or macOS?

Also, these metrics are for Python, so maybe is the driver, maybe is the server, etc. Definitely, we should get some profiling stats, to at least know how many time takes each part.i

For sure the performance can be improved and we should improve, but at least in the latest metrics I got from engine, bblfshd is not being the bottleneck at all.

from bblfshd.

smacker avatar smacker commented on July 19, 2024

Okay. Not in roadmap. Thanks!

Let me give more context. I'm working on hercules-web during OSDs. I want to calculate function hotness. But it's way too slow for web service even for small repos.
I wanted to spend my next OSDs writing some benchmarks and try to optimize it.

But very often performance optimizations add complexity to code. Can I expect such PRs to be merged or if it's totally not a focus will it be rejected?

from bblfshd.

juanjux avatar juanjux commented on July 19, 2024

Out of focus PRs won't be rejected, the focus is for the language-analysis team planned tasks/epics and doesn't apply to contributions from other teams or OSDs.

from bblfshd.

smacker avatar smacker commented on July 19, 2024

Thanks a lot! My own thoughts how to do it are very similar :)
I just don't think I need to hack the native drivers. Every driver has cli tool which reads from stdin. I can use it!

from bblfshd.

smacker avatar smacker commented on July 19, 2024

got some results: https://github.com/smacker/bblfsh-benchmark

from bblfshd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.