{"action":"created","issue":{"url":"https://api.github.com/repos/godotengine/godot/issues/20323","repository_url":"https://api.github.com/repos/godotengine/godot","labels_url":"https://api.github.com/repos/godotengine/godot/issues/20323/labels{/name}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/20323/comments","events_url":"https://api.github.com/repos/godotengine/godot/issues/20323/events","html_url":"https://github.com/godotengine/godot/issues/20323","id":343295757,"node_id":"MDU6SXNzdWUzNDMyOTU3NTc=","number":20323,"title":"TileMap.set_cell very slow in Master (3.1)","user":{"login":"nazgum","id":13953,"node_id":"MDQ6VXNlcjEzOTUz","avatar_url":"https://avatars2.githubusercontent.com/u/13953?v=4","gravatar_id":"","url":"https://api.github.com/users/nazgum","html_url":"https://github.com/nazgum","followers_url":"https://api.github.com/users/nazgum/followers","following_url":"https://api.github.com/users/nazgum/following{/other_user}","gists_url":"https://api.github.com/users/nazgum/gists{/gist_id}","starred_url":"https://api.github.com/users/nazgum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nazgum/subscriptions","organizations_url":"https://api.github.com/users/nazgum/orgs","repos_url":"https://api.github.com/users/nazgum/repos","events_url":"https://api.github.com/users/nazgum/events{/privacy}","received_events_url":"https://api.github.com/users/nazgum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-21T04:19:35Z","updated_at":"2018-07-21T13:58:35Z","closed_at":null,"author_association":"NONE","body":"**Godot version:**\r\nMaster -  v3.1.dev.calinou.cfcb6e1\r\n\r\n**OS/device including version:**\r\nLinux with OpenGL ES 3.0 Renderer: GeForce GTX 670M/PCIe/SSE2\r\n\r\n**Issue description:**\r\nUsing set_cell on tilemaps is extremely slow compared to 3.0 (Stable).  Running the following loop for updating tiles:\r\n\r\n```\r\nvar start_time = OS.get_ticks_msec()\r\n\r\nfor x in 100:\r\n   for y in 100:\r\n      set_cell(x, y, 1)\r\n\r\nvar end_time = OS.get_ticks_msec()\r\nprint(\"time taken: \", end_time - start_time)\r\n```\r\nOn Godot 3.0.x stable, this takes around 11ms.   On master, this takes 660ms (around 60x slower).  Looping through a bigger TileMap makes this worse.\r\n\r\n```\r\nfor x in 500:\r\n   for y in 500:\r\n      set_cell(x, y, 1)\r\n```\r\n\r\nThis code takes 385ms on 3.0 Stable.  On Master, it takes 34392ms (around 100x slower).\r\n\r\n**Steps to reproduce:**\r\nRun the attached project (or MyMap.tscn) and check the output to see the time taken. \r\n\r\n**Minimal reproduction project:**\r\n[tilemap-slow.zip](https://github.com/godotengine/godot/files/2215861/tilemap-slow.zip)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/godotengine/godot/issues/comments/406798513","html_url":"https://github.com/godotengine/godot/issues/20323#issuecomment-406798513","issue_url":"https://api.github.com/repos/godotengine/godot/issues/20323","id":406798513,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjc5ODUxMw==","user":{"login":"nazgum","id":13953,"node_id":"MDQ6VXNlcjEzOTUz","avatar_url":"https://avatars2.githubusercontent.com/u/13953?v=4","gravatar_id":"","url":"https://api.github.com/users/nazgum","html_url":"https://github.com/nazgum","followers_url":"https://api.github.com/users/nazgum/followers","following_url":"https://api.github.com/users/nazgum/following{/other_user}","gists_url":"https://api.github.com/users/nazgum/gists{/gist_id}","starred_url":"https://api.github.com/users/nazgum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nazgum/subscriptions","organizations_url":"https://api.github.com/users/nazgum/orgs","repos_url":"https://api.github.com/users/nazgum/repos","events_url":"https://api.github.com/users/nazgum/events{/privacy}","received_events_url":"https://api.github.com/users/nazgum/received_events","type":"User","site_admin":false},"created_at":"2018-07-21T13:58:35Z","updated_at":"2018-07-21T13:58:35Z","author_association":"NONE","body":"I first ran into this about 3 weeks ago, as I tried to grab a master build to play around with the new input strength feature.  I tried once more a few days later, then waited til now to see if perhaps it was simply due to the alpha state.  So this happened for me with 3 different master builds, all within July; I haven't tested Master prior to that.\r\n\r\nAm making a roguelike, so I loop through tilemaps a lot using set_cell to build the levels; the level creation process goes from about 500ms on 3.0 (Stable) to 5+ minutes on Master."}}
{"actor":{"display_login":"nazgum"}}