{"action":"created","issue":{"url":"https://api.github.com/repos/rbrush/clara-rules/issues/125","labels_url":"https://api.github.com/repos/rbrush/clara-rules/issues/125/labels{/name}","comments_url":"https://api.github.com/repos/rbrush/clara-rules/issues/125/comments","events_url":"https://api.github.com/repos/rbrush/clara-rules/issues/125/events","html_url":"https://github.com/rbrush/clara-rules/issues/125","id":106740334,"number":125,"title":"Memory use in CLJS","user":{"login":"jpthomson","id":3108908,"avatar_url":"https://avatars.githubusercontent.com/u/3108908?v=3","gravatar_id":"","url":"https://api.github.com/users/jpthomson","html_url":"https://github.com/jpthomson","followers_url":"https://api.github.com/users/jpthomson/followers","following_url":"https://api.github.com/users/jpthomson/following{/other_user}","gists_url":"https://api.github.com/users/jpthomson/gists{/gist_id}","starred_url":"https://api.github.com/users/jpthomson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpthomson/subscriptions","organizations_url":"https://api.github.com/users/jpthomson/orgs","repos_url":"https://api.github.com/users/jpthomson/repos","events_url":"https://api.github.com/users/jpthomson/events{/privacy}","received_events_url":"https://api.github.com/users/jpthomson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-16T09:59:41Z","updated_at":"2015-09-17T16:23:15Z","closed_at":null,"body":"Hey all,\r\n\r\nMore of an open ended question for anyone use played with Clara in Clojurescript.  I'm seeing large spikes in memory footprint when assembling the session, specifically in building the beta network.\r\n\r\nTo give you an idea, we currently have 20 rules, with between 2 and 10 LHS clauses, each with two conditionals.  This results in a memory spike of around 400mb, much of which seems to get garbage collected.\r\n\r\nDoes this seem reasonable?  Any pointers of what specifically could be allocating this memory?\r\n\r\nMany thanks in advance.\r\n\r\nJonathan"},"comment":{"url":"https://api.github.com/repos/rbrush/clara-rules/issues/comments/141139121","html_url":"https://github.com/rbrush/clara-rules/issues/125#issuecomment-141139121","issue_url":"https://api.github.com/repos/rbrush/clara-rules/issues/125","id":141139121,"user":{"login":"rbrush","id":574824,"avatar_url":"https://avatars.githubusercontent.com/u/574824?v=3","gravatar_id":"","url":"https://api.github.com/users/rbrush","html_url":"https://github.com/rbrush","followers_url":"https://api.github.com/users/rbrush/followers","following_url":"https://api.github.com/users/rbrush/following{/other_user}","gists_url":"https://api.github.com/users/rbrush/gists{/gist_id}","starred_url":"https://api.github.com/users/rbrush/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbrush/subscriptions","organizations_url":"https://api.github.com/users/rbrush/orgs","repos_url":"https://api.github.com/users/rbrush/repos","events_url":"https://api.github.com/users/rbrush/events{/privacy}","received_events_url":"https://api.github.com/users/rbrush/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T16:23:15Z","updated_at":"2015-09-17T16:23:15Z","body":"@jpthomson Cool, let me know if you find anything interesting. It's possible the way we're constructing the rete network for ClojureScript is inefficient -- it basically just generates a single, large evaluation tree for the network -- but that can be broken up if it causes problems.\r\n\r\nI've also noticed that web browsers will sometimes just grab memory if it's available (it's there to be used!), which can really inflate the reported usage even though that memory can be quickly freed. Right now my gmail tab is consuming 380 MB by itself. \r\n\r\nThat all said, I'd love to have more diligence given to the ClojureScript version of Clara. I'm comfortable with the performance of the Clojure version (I use it heavily in production), but having more ClojureScript users interested in contributing to that would be great."}}