{"action":"opened","issue":{"url":"https://api.github.com/repos/akuz/joptimizer/issues/1","labels_url":"https://api.github.com/repos/akuz/joptimizer/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/akuz/joptimizer/issues/1/comments","events_url":"https://api.github.com/repos/akuz/joptimizer/issues/1/events","html_url":"https://github.com/akuz/joptimizer/issues/1","id":104517703,"number":1,"title":"Bad memory management causes heap space to run out pretty fast","user":{"login":"younes-abouelnagah","id":9809574,"avatar_url":"https://avatars.githubusercontent.com/u/9809574?v=3","gravatar_id":"","url":"https://api.github.com/users/younes-abouelnagah","html_url":"https://github.com/younes-abouelnagah","followers_url":"https://api.github.com/users/younes-abouelnagah/followers","following_url":"https://api.github.com/users/younes-abouelnagah/following{/other_user}","gists_url":"https://api.github.com/users/younes-abouelnagah/gists{/gist_id}","starred_url":"https://api.github.com/users/younes-abouelnagah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/younes-abouelnagah/subscriptions","organizations_url":"https://api.github.com/users/younes-abouelnagah/orgs","repos_url":"https://api.github.com/users/younes-abouelnagah/repos","events_url":"https://api.github.com/users/younes-abouelnagah/events{/privacy}","received_events_url":"https://api.github.com/users/younes-abouelnagah/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-02T16:13:43Z","updated_at":"2015-09-02T16:13:43Z","closed_at":null,"body":"The library heavily uses DoubleFactory2D.dense and DoubleFactory1D.dense, which causes the heap space to run out pretty quickly even for relatively small problems. I have subclassed some XYZFunction classes and replaced the factory used by the sparse factory and got a much better memory efficiency. \r\n\r\nAlso, please allow passing in the sparse matrix or vector directly to the setters, rather than passing a double[] which gets converted into a matrix. Requiring a double[] by the setter makes it necessary to allocate the memory for all the zeros in the matrix, and minimizes the benefit of the use of Colt."}}