Comments (6)
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.
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.
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.
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.
@nielsbasjes Please help with the above query.
from yauaa.
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)
- Abstract logging with SLF4j HOT 2
- Incorrect Yahoo crawler HOT 2
- Release a new version with updated dependencies HOT 2
- Fix maven-artifact-plugin 3.5.0 project.build.outputTimestamp error. HOT 3
- Normalize.replaceString is vulnerable to out of denial of service (DoS) attack HOT 1
- AntPathMatcher.match is vulnerable to out of denial of service (DoS) attack HOT 1
- TODO: Remove Antlr4 - Java 21 workaround HOT 2
- Reasons for Windows NT on mobile devices HOT 1
- In k8s+istio environment, parsing does not respond HOT 2
- 系统版本号解析异常 HOT 1
- why not DeviceName is not V2311 HOT 2
- Wrong typification for ZTE T1002 HOT 7
- Errors When Loading Files HOT 4
- Supermium HOT 1
- Frozen SamsungBrowser HOT 9
- Fix long header value in webapp HOT 1
- Errors When Loading Files. HOT 2
- Detecting email clients from user-agent HOT 7
- Fix reproducibility HOT 1
- Browsers to investigate
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yauaa.