Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having the SuperUnityBuild editor window open in the inspector causes noticeable lag in play mode #14

Closed
XaeroDegreaz opened this issue Apr 13, 2017 · 5 comments

Comments

@XaeroDegreaz
Copy link

XaeroDegreaz commented Apr 13, 2017

It seems to only happen when the window is active -- if it's part of a tab group and not activated there's no lag. It doesn't appear to affect the actual framerate (according to the stats dropdown) but it seems to cause a bit of UI lag. Feels like every .25 seconds or something.

It seems to lag not only the play window, but other UI responsiveness such as editing text fields.

@Chaser324
Copy link
Collaborator

Thanks for pointing this out. I do typically keep it in a tab that's only active when I'm using it, so I guess I haven't noticed.

I suspect this is probably caused by the window repainting more often than is necessary. That would explain why it only happens when you have it visible and active. It also makes sense that it would be that because I know my code related to that is a bit sloppy. I was having trouble making sure that undo/redo events were caught and reflected in the UI, so I probably overcompensated in dealing with that issue.

@XaeroDegreaz
Copy link
Author

Gotta love OnGUI.

I had the same issue that I never really could overcome for an in-Unity Git client I put on the asset store a few years back.

@Chaser324
Copy link
Collaborator

It is a tough problem to tackle. I'm sure there's probably a better solution than whatever I'm doing now, but it wasn't immediately apparent at the time I was initially setting up things. I'll take another look and see what I can do to improve things.

@Chaser324
Copy link
Collaborator

I just pushed a commit that should help with this. For me, Unity was using about 5% CPU while idling with the Unity Build window open, and now it's idling at less than 1% CPU. Take a look and let me know if you think it's sufficient.

@Chaser324
Copy link
Collaborator

Going to go ahead and close this for now. While I'm sure more improvements can be made, I haven't heard any complaints in a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants