{"action":"created","issue":{"url":"https://api.github.com/repos/raoulvdberge/refinedstorage/issues/501","repository_url":"https://api.github.com/repos/raoulvdberge/refinedstorage","labels_url":"https://api.github.com/repos/raoulvdberge/refinedstorage/issues/501/labels{/name}","comments_url":"https://api.github.com/repos/raoulvdberge/refinedstorage/issues/501/comments","events_url":"https://api.github.com/repos/raoulvdberge/refinedstorage/issues/501/events","html_url":"https://github.com/raoulvdberge/refinedstorage/issues/501","id":184703004,"number":501,"title":"[1.2-beta1] Performance issue with processing patterns and ItemStackList","user":{"login":"RealGrep","id":1060816,"avatar_url":"https://avatars.githubusercontent.com/u/1060816?v=3","gravatar_id":"","url":"https://api.github.com/users/RealGrep","html_url":"https://github.com/RealGrep","followers_url":"https://api.github.com/users/RealGrep/followers","following_url":"https://api.github.com/users/RealGrep/following{/other_user}","gists_url":"https://api.github.com/users/RealGrep/gists{/gist_id}","starred_url":"https://api.github.com/users/RealGrep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RealGrep/subscriptions","organizations_url":"https://api.github.com/users/RealGrep/orgs","repos_url":"https://api.github.com/users/RealGrep/repos","events_url":"https://api.github.com/users/RealGrep/events{/privacy}","received_events_url":"https://api.github.com/users/RealGrep/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/raoulvdberge/refinedstorage/labels/performance","name":"performance","color":"b60205"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-10-23T17:33:41Z","updated_at":"2016-10-24T20:08:08Z","closed_at":"2016-10-24T20:00:09Z","body":"#### Issue description:\r\nSomething in the way it manages adding items to machines using processing patterns is just hammering the server.\r\n\r\n#### What happens:\r\n Looking at the machines, including a Mekanism crusher and smelter (both elite and doing 7 at a time, and with 4 speed upgrades, set to auto-sort), and the solderer, while crafting two 64k storage disks, the progress arrows are jerky and the machines are running at far less than the speed they should be. The client is fine, but the server is reporting \"Can't keep up!\" messages. They ceased once the crafting operation was completed. If I manually insert a stack of iron into the solderer when no autocrafting is happening, it runs smoothly and without jerking.\r\n\r\nSo I, of course, ran some profiling with Sampler, and loaded up the .nps file in VisualVM. I see a few things taking a lot of processing time on the server. For example, ItemStackList.add(), ItemStackList.copy(), TileController.func_73660_a(), CraftingTask.update(). There's others like Comparer.isEqual() and isEqualNoQuant() that also might be taking up more time than desirable.\r\n\r\nThe .nps file can be found here: https://www.dropbox.com/s/3biafjq8kv6qlts/rs-beta-profile.nps?dl=0\r\n\r\nYou know, on the good side, it completed and never jammed up once! :D\r\n\r\n#### What you expected to happen:\r\nFor it to not result in jerky, slow processing, and for it to be kind to the server.\r\n\r\n#### Steps to reproduce:\r\n1. Set up processing for 64k storage disks. I used a Mekanism crusher and smelter, but other machines should have the same result (as the solderer seemed also affected).\r\n2. Request two 64k storage disks.\r\n3. Observe the machines and notice they are operating in a jerky fashion, and the server is being hammered.\r\n\r\nShould still happen with other types of items and patterns, but this is the one I used to test, since that would often jam up with previous versions (and I needed more storage space, anyway).\r\n\r\n#### Version (Make sure you are on the latest version before reporting):\r\n\r\n- Minecraft: 1.10.2\r\n- Forge: 12.18.2.2107\r\n- Refined Storage: 1.2-beta1\r\n\r\nDoes this issue occur on a server? [yes/no] Yes\r\n\r\n#### If a (crash)log is relevant for this issue, link it here:\r\nNo crash or crash log, but see profiler file above."},"comment":{"url":"https://api.github.com/repos/raoulvdberge/refinedstorage/issues/comments/255850934","html_url":"https://github.com/raoulvdberge/refinedstorage/issues/501#issuecomment-255850934","issue_url":"https://api.github.com/repos/raoulvdberge/refinedstorage/issues/501","id":255850934,"user":{"login":"way2muchnoise","id":5518998,"avatar_url":"https://avatars.githubusercontent.com/u/5518998?v=3","gravatar_id":"","url":"https://api.github.com/users/way2muchnoise","html_url":"https://github.com/way2muchnoise","followers_url":"https://api.github.com/users/way2muchnoise/followers","following_url":"https://api.github.com/users/way2muchnoise/following{/other_user}","gists_url":"https://api.github.com/users/way2muchnoise/gists{/gist_id}","starred_url":"https://api.github.com/users/way2muchnoise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/way2muchnoise/subscriptions","organizations_url":"https://api.github.com/users/way2muchnoise/orgs","repos_url":"https://api.github.com/users/way2muchnoise/repos","events_url":"https://api.github.com/users/way2muchnoise/events{/privacy}","received_events_url":"https://api.github.com/users/way2muchnoise/received_events","type":"User","site_admin":false},"created_at":"2016-10-24T20:08:08Z","updated_at":"2016-10-24T20:08:08Z","body":"Thx @RealGrep the profiling really helps out. And the issue it had where just me being stupid :D"}}
{"actor":{"display_login":"way2muchnoise"}}