Giter Club home page Giter Club logo

Comments (6)

nielsbasjes avatar nielsbasjes commented on August 25, 2024 1

Starting the analyzer usually takes between 2 and 5 seconds (depending on available CPU speed).
During this step the banner is printed (takes about 1ms). Not printing the banner does not solve your performance problem.

I suspect that you are instantiating the analyser too often.
Have a look at the Hive udf I wrote where I create an instance that lives for a very long time.

from yauaa.

nielsbasjes avatar nielsbasjes commented on August 25, 2024 1

So far I have never done anything with spring-boot so I don't know what the 'right' way of doing things there. In normal java you would simply instantiate the analyzer using the singleton pattern and then call that one from the rest of your code. The Hive UDF is an example that does this.

Since this is neither a bug nor a sensible change in my code I'm closing this.

from yauaa.

david-thrymr avatar david-thrymr commented on August 25, 2024

Sir I'm not understanding how to use hive udf. For every http request from client I need to capture his browser, device and os info I implemented code from your api to separately capture os device info and browser info in 3 different methods instantiating
final UserAgent agent = uaa1.parse(request.getHeader("User-Agent"));
in all methods so please give me idea how to @autowire this class in the service and use in all methods
I need any solution if possible please I'm using spring boot to write services classes.

from yauaa.

anuj09garg avatar anuj09garg commented on August 25, 2024

Hi,
Can I autowire this class in java so that it doesn't load every time I call it and avoid it from taking 2-5 secs.

from yauaa.

anuj09garg avatar anuj09garg commented on August 25, 2024

@nielsbasjes Please help with the above query.

from yauaa.

nielsbasjes avatar nielsbasjes commented on August 25, 2024

You should only start it once and the fire many requests at it. I do not know what "autowire" means to answer your question.

from yauaa.

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.