{"action":"created","issue":{"url":"https://api.github.com/repos/nielsbasjes/yauaa/issues/105","repository_url":"https://api.github.com/repos/nielsbasjes/yauaa","labels_url":"https://api.github.com/repos/nielsbasjes/yauaa/issues/105/labels{/name}","comments_url":"https://api.github.com/repos/nielsbasjes/yauaa/issues/105/comments","events_url":"https://api.github.com/repos/nielsbasjes/yauaa/issues/105/events","html_url":"https://github.com/nielsbasjes/yauaa/issues/105","id":348205935,"node_id":"MDU6SXNzdWUzNDgyMDU5MzU=","number":105,"title":"memory leak possibility?  ","user":{"login":"email2liyang","id":443527,"node_id":"MDQ6VXNlcjQ0MzUyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/443527?v=4","gravatar_id":"","url":"https://api.github.com/users/email2liyang","html_url":"https://github.com/email2liyang","followers_url":"https://api.github.com/users/email2liyang/followers","following_url":"https://api.github.com/users/email2liyang/following{/other_user}","gists_url":"https://api.github.com/users/email2liyang/gists{/gist_id}","starred_url":"https://api.github.com/users/email2liyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/email2liyang/subscriptions","organizations_url":"https://api.github.com/users/email2liyang/orgs","repos_url":"https://api.github.com/users/email2liyang/repos","events_url":"https://api.github.com/users/email2liyang/events{/privacy}","received_events_url":"https://api.github.com/users/email2liyang/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-07T07:47:42Z","updated_at":"2018-08-07T08:37:25Z","closed_at":null,"author_association":"NONE","body":"we have a single UserAgentAnalyzer in our whole application\r\n```\r\nUserAgentAnalyzer\r\n            .newBuilder()\r\n            .hideMatcherLoadStats()\r\n\r\n            // limit to only OS and Browser info - decrease RAM size to ~60Mb (full one ~220Mb)\r\n            .withField(\"OperatingSystemNameVersion\")\r\n            .withField(\"AgentNameVersionMajor\")\r\n            .withCache(25000)\r\n            .build()\r\n```\r\n\r\nat run time we only invoke \r\n```\r\nUserAgent agent = userAgentAnalyzer.parse(userAgent);\r\n```\r\n\r\nwhen we deploy the code into production env, we meet very large memory usage of the application, when I dump live memory  and analyse it, we found it may be caused by yauaa, because it end out lots of duplicated agent information in the memory and it's also hashmap related.\r\n\r\nis there any thing we need to do to clean up cache or do any clean up steps needed to do at run time to reduce the memory?\r\n\r\n![screen shot 2018-08-07 at 3 28 07 pm](https://user-images.githubusercontent.com/443527/43761823-c3e73f38-9a58-11e8-82d7-0ea976cd7301.png)\r\n![screen shot 2018-08-07 at 3 28 34 pm](https://user-images.githubusercontent.com/443527/43761824-c42518a8-9a58-11e8-9809-208a3b4f8074.png)\r\n![screen shot 2018-08-07 at 3 48 34 pm](https://user-images.githubusercontent.com/443527/43762049-6d4666b2-9a59-11e8-91ea-821a6280e851.png)\r\n"},"comment":{"url":"https://api.github.com/repos/nielsbasjes/yauaa/issues/comments/410979772","html_url":"https://github.com/nielsbasjes/yauaa/issues/105#issuecomment-410979772","issue_url":"https://api.github.com/repos/nielsbasjes/yauaa/issues/105","id":410979772,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDk3OTc3Mg==","user":{"login":"email2liyang","id":443527,"node_id":"MDQ6VXNlcjQ0MzUyNw==","avatar_url":"https://avatars2.githubusercontent.com/u/443527?v=4","gravatar_id":"","url":"https://api.github.com/users/email2liyang","html_url":"https://github.com/email2liyang","followers_url":"https://api.github.com/users/email2liyang/followers","following_url":"https://api.github.com/users/email2liyang/following{/other_user}","gists_url":"https://api.github.com/users/email2liyang/gists{/gist_id}","starred_url":"https://api.github.com/users/email2liyang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/email2liyang/subscriptions","organizations_url":"https://api.github.com/users/email2liyang/orgs","repos_url":"https://api.github.com/users/email2liyang/repos","events_url":"https://api.github.com/users/email2liyang/events{/privacy}","received_events_url":"https://api.github.com/users/email2liyang/received_events","type":"User","site_admin":false},"created_at":"2018-08-07T08:37:25Z","updated_at":"2018-08-07T08:37:25Z","author_association":"NONE","body":"from the memory analyse below, we could confirm we only have one instance of UserAgentAnalyzer in our application, but it generate lots of things in memory\r\n![screen shot 2018-08-07 at 4 35 55 pm](https://user-images.githubusercontent.com/443527/43764493-24feb524-9a60-11e8-8c60-2172823f6324.png)\r\n"}}
{"actor":{"display_login":"email2liyang"}}