{"comment":{"url":"https://api.github.com/repos/mickelson/attract/comments/30855663","html_url":"https://github.com/mickelson/attract/commit/94b521cd96df965206d930912663c19f541c54b5#commitcomment-30855663","id":30855663,"node_id":"MDEzOkNvbW1pdENvbW1lbnQzMDg1NTY2Mw==","user":{"login":"oomek","id":2974860,"node_id":"MDQ6VXNlcjI5NzQ4NjA=","avatar_url":"https://avatars1.githubusercontent.com/u/2974860?v=4","gravatar_id":"","url":"https://api.github.com/users/oomek","html_url":"https://github.com/oomek","followers_url":"https://api.github.com/users/oomek/followers","following_url":"https://api.github.com/users/oomek/following{/other_user}","gists_url":"https://api.github.com/users/oomek/gists{/gist_id}","starred_url":"https://api.github.com/users/oomek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oomek/subscriptions","organizations_url":"https://api.github.com/users/oomek/orgs","repos_url":"https://api.github.com/users/oomek/repos","events_url":"https://api.github.com/users/oomek/events{/privacy}","received_events_url":"https://api.github.com/users/oomek/received_events","type":"User","site_admin":false},"position":null,"line":null,"path":null,"commit_id":"94b521cd96df965206d930912663c19f541c54b5","created_at":"2018-10-10T22:47:00Z","updated_at":"2018-10-10T22:47:00Z","author_association":"COLLABORATOR","body":"I did some tests and for a collection of same size snaps this commit gives a 20-25% improvement in loading times. We could leave it as it is but with a change of the line 518 to:\r\n\r\n`if (( tex_size.x != m_used_size.x ) || ( tex_size.y != m_used_size.y ))`\r\n\r\nThat way we have boost for non mame emulators as the snaps will most likely be the same size for the whole collection. All other types of artwork and mame snaps would have to rely on the next steps in optimisation as the drawbacks of reuising the textures as containters for diffrent sized images are not worth a hastle unfortunately. The bleeding on the edges is not looking good and low level mipmaps are a mess.\r\n\r\nHere is my idea of a todo list gathered from our discussion:\r\n1. Reuse same size texture resource and call update() instead of loadFromImage() (Done)\r\n2. Reuse the sf::Textures loaded earlier and bind them to sprites based on the filename.\r\n3. Preload next and previous images in a separate thread and then construct textures in the main thread but spreading the workload through several frames.\r\n4. Change the loadFromImage() function to native OpenGL so we can use PBO's. I have a working example if you need to take a peek."}}
{"actor":{"display_login":"oomek"}}