UniSkinMod icon indicating copy to clipboard operation
UniSkinMod copied to clipboard

Make skin loading asynchronously

Open RecursiveG opened this issue 9 years ago • 3 comments

Current synchronous skin loading strategy causes severe game lag.

RecursiveG avatar May 21 '16 02:05 RecursiveG

When 'SkinManager' does 'loadSkin', it has been running in a thread named 'pool-x-thread-x'. It isn't 'client-thread', so it's no use to make async loading again to avoid to affect game. 'SkinManager'调用'loadSkin'加载皮肤时,本已运行于一个独立于'client-thread'的名为'pool-x-thread-x'的线程中,感觉并不需要再次制作异步加载来避免对游戏主体产生影响。(为何不能好好说中文= =) 注:仅针对用户皮肤加载,头颅皮肤加载是主线程的任务

xfl03 avatar Jun 05 '16 10:06 xfl03

Note: SSP /give xx skull 1 3 {SkullOwner: oo} CommandGive.java#L66 TileEntityItemStackRenderer.java#L74 stuck on client thread.

RecursiveG avatar Jun 06 '16 06:06 RecursiveG

Yes, I said that 'skull loads in client thread'. But now, UniSkinMod has loading skull texture in a new thread, isn't it?

xfl03 avatar Jun 06 '16 06:06 xfl03