{"action":"created","issue":{"url":"https://api.github.com/repos/owtf/owtf/issues/387","labels_url":"https://api.github.com/repos/owtf/owtf/issues/387/labels{/name}","comments_url":"https://api.github.com/repos/owtf/owtf/issues/387/comments","events_url":"https://api.github.com/repos/owtf/owtf/issues/387/events","html_url":"https://github.com/owtf/owtf/issues/387","id":55698299,"number":387,"title":"OWTF start is slow","user":{"login":"DePierre","id":923297,"avatar_url":"https://avatars.githubusercontent.com/u/923297?v=3","gravatar_id":"","url":"https://api.github.com/users/DePierre","html_url":"https://github.com/DePierre","followers_url":"https://api.github.com/users/DePierre/followers","following_url":"https://api.github.com/users/DePierre/following{/other_user}","gists_url":"https://api.github.com/users/DePierre/gists{/gist_id}","starred_url":"https://api.github.com/users/DePierre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DePierre/subscriptions","organizations_url":"https://api.github.com/users/DePierre/orgs","repos_url":"https://api.github.com/users/DePierre/repos","events_url":"https://api.github.com/users/DePierre/events{/privacy}","received_events_url":"https://api.github.com/users/DePierre/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owtf/owtf/labels/Enhancement","name":"Enhancement","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-28T00:47:28Z","updated_at":"2015-01-29T04:08:07Z","closed_at":null,"body":"IMHO OWTF can be optimized to load faster but I am still not sure how we can do that. We need some investigation here."},"comment":{"url":"https://api.github.com/repos/owtf/owtf/issues/comments/71966048","html_url":"https://github.com/owtf/owtf/issues/387#issuecomment-71966048","issue_url":"https://api.github.com/repos/owtf/owtf/issues/387","id":71966048,"user":{"login":"tunnelshade","id":2751016,"avatar_url":"https://avatars.githubusercontent.com/u/2751016?v=3","gravatar_id":"","url":"https://api.github.com/users/tunnelshade","html_url":"https://github.com/tunnelshade","followers_url":"https://api.github.com/users/tunnelshade/followers","following_url":"https://api.github.com/users/tunnelshade/following{/other_user}","gists_url":"https://api.github.com/users/tunnelshade/gists{/gist_id}","starred_url":"https://api.github.com/users/tunnelshade/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunnelshade/subscriptions","organizations_url":"https://api.github.com/users/tunnelshade/orgs","repos_url":"https://api.github.com/users/tunnelshade/repos","events_url":"https://api.github.com/users/tunnelshade/events{/privacy}","received_events_url":"https://api.github.com/users/tunnelshade/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T04:08:07Z","updated_at":"2015-01-29T04:08:07Z","body":"The fastest way is to add all the resource, config objects (all db objects we do during initialisation phases) to one single session and commit ``only once``. This will be significantly faster since we are actually writing to db only once. For example look [here](https://github.com/owtf/owtf/blob/develop/framework/db/transaction_manager.py#L301). The `commit()` call is **outside** the for loop."}}