{"action":"created","issue":{"url":"https://api.github.com/repos/RepreZen/SwagEdit/issues/273","repository_url":"https://api.github.com/repos/RepreZen/SwagEdit","labels_url":"https://api.github.com/repos/RepreZen/SwagEdit/issues/273/labels{/name}","comments_url":"https://api.github.com/repos/RepreZen/SwagEdit/issues/273/comments","events_url":"https://api.github.com/repos/RepreZen/SwagEdit/issues/273/events","html_url":"https://github.com/RepreZen/SwagEdit/pull/273","id":221603804,"number":273,"title":"ZEN-3423 Performance optimizations","user":{"login":"tfesenko","id":644582,"avatar_url":"https://avatars3.githubusercontent.com/u/644582?v=3","gravatar_id":"","url":"https://api.github.com/users/tfesenko","html_url":"https://github.com/tfesenko","followers_url":"https://api.github.com/users/tfesenko/followers","following_url":"https://api.github.com/users/tfesenko/following{/other_user}","gists_url":"https://api.github.com/users/tfesenko/gists{/gist_id}","starred_url":"https://api.github.com/users/tfesenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfesenko/subscriptions","organizations_url":"https://api.github.com/users/tfesenko/orgs","repos_url":"https://api.github.com/users/tfesenko/repos","events_url":"https://api.github.com/users/tfesenko/events{/privacy}","received_events_url":"https://api.github.com/users/tfesenko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-04-13T15:46:47Z","updated_at":"2017-04-13T15:47:20Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/RepreZen/SwagEdit/pulls/273","html_url":"https://github.com/RepreZen/SwagEdit/pull/273","diff_url":"https://github.com/RepreZen/SwagEdit/pull/273.diff","patch_url":"https://github.com/RepreZen/SwagEdit/pull/273.patch"},"body":"## Improvements\r\n1. Discard previous validations on the same model if a new validation is scheduled. I also made the validation job “cancellable” - it means that now cancelling it in the GUI will actually make effect.\r\n2. Model parsing was another memory-consuming operation because Jackson deserialization uses mutant-factories to provide thread-safeness. \r\n3. Change priority of the `SafeWorkspaceJob` to LONG. We use it for validation and model save, and these are long operations.\r\n\r\n## First validation is always slow\r\nBecause we need to load JSON Schemas for Swagger and JSON Schema Core, it takes some time. As it’s a one-time thing, it’s out of scope of this PR.\r\n\r\n## How to test\r\nYou need a big model, a good big model is attached to https://modelsolv.atlassian.net/browse/ZEN-2583 . It also has many validation warnings, it's good test performance of validation.\r\nYou may also need to decrease VM memory, as low as `-Xms200m -Xmx200m -XX:PermSize=100m -XX:MaxPermSize=100m` is sufficient. "},"comment":{"url":"https://api.github.com/repos/RepreZen/SwagEdit/issues/comments/293934628","html_url":"https://github.com/RepreZen/SwagEdit/pull/273#issuecomment-293934628","issue_url":"https://api.github.com/repos/RepreZen/SwagEdit/issues/273","id":293934628,"user":{"login":"tfesenko","id":644582,"avatar_url":"https://avatars3.githubusercontent.com/u/644582?v=3","gravatar_id":"","url":"https://api.github.com/users/tfesenko","html_url":"https://github.com/tfesenko","followers_url":"https://api.github.com/users/tfesenko/followers","following_url":"https://api.github.com/users/tfesenko/following{/other_user}","gists_url":"https://api.github.com/users/tfesenko/gists{/gist_id}","starred_url":"https://api.github.com/users/tfesenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tfesenko/subscriptions","organizations_url":"https://api.github.com/users/tfesenko/orgs","repos_url":"https://api.github.com/users/tfesenko/repos","events_url":"https://api.github.com/users/tfesenko/events{/privacy}","received_events_url":"https://api.github.com/users/tfesenko/received_events","type":"User","site_admin":false},"created_at":"2017-04-13T15:47:20Z","updated_at":"2017-04-13T15:47:20Z","body":"@andylowry , can you please review?"}}
{"actor":{"display_login":"tfesenko"}}