Code Monkey home page Code Monkey logo

Comments (10)

algernon avatar algernon commented on August 15, 2024

Well, it does memory allocation, lookup and formatting every single time. I suppose using nsdc or similar for caching may make it faster, and with some tricks, we could make it possible to only allocate once (but then we'd have a lock, so that likely wouldn't buy us much).

I'll try to do some profiling to see which part is the slowest. By the way, are you using LDAP or something similarly expensive? And which getent function is slow? passwd & group?

from syslog-ng-incubator.

faxm0dem avatar faxm0dem commented on August 15, 2024

I do use nscd and I was using getent protocols.
I'll test if others are faster tomorrow.
geoip is much faster

from syslog-ng-incubator.

algernon avatar algernon commented on August 15, 2024

GeoIP loads the database once on startup (or reload), and only uses memory after that, if I remember correctly. I suppose we could do the same with getent, but that's risky (if you have an LDAP with 30k+ users, startup would be incredibly slow...).

from syslog-ng-incubator.

algernon avatar algernon commented on August 15, 2024

Hm... or, we could cache results ourselves. I'll try to do some profiling and see if caching helps.

from syslog-ng-incubator.

faxm0dem avatar faxm0dem commented on August 15, 2024

Awesome, thanks!

from syslog-ng-incubator.

juhaszviktor avatar juhaszviktor commented on August 15, 2024

I think this question is answered, so I close this Issue

from syslog-ng-incubator.

faxm0dem avatar faxm0dem commented on August 15, 2024

@algernon proposed to do some tests, but this has not been addressed yet

from syslog-ng-incubator.

juhaszviktor avatar juhaszviktor commented on August 15, 2024

Sorry, I issue reopened

from syslog-ng-incubator.

algernon avatar algernon commented on August 15, 2024

Not sure when (or in all honesty, if) I will have time to do any tests.

from syslog-ng-incubator.

mochrul avatar mochrul commented on August 15, 2024

genet module is removed from the incubator and merged into syslog-ng master.

If you still have concerns with the speed of the getent module, please open a new ticket in the syslog-ng project.

from syslog-ng-incubator.

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.