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

I'd like your opinion on the performance #22

Open
Armitage1982 opened this issue Apr 18, 2018 · 5 comments
Open

I'd like your opinion on the performance #22

Armitage1982 opened this issue Apr 18, 2018 · 5 comments
Labels

Comments

@Armitage1982
Copy link

Hi

I regularly visit this repo because WinForm is exactly what I miss the most right now in Unity.
Big kudos for your wrapper !

The only thing that prevents me from using it now is that it seems a bit greedy in performance.

Do you have any suggestions or planning to improve on that?
I wonder if the new features of Unity 2018 could be an « easy way » to address this point.

Anyway, thanks for all !

@Meragon
Copy link
Owner

Meragon commented Apr 18, 2018

Hey.

I see only two options to improve performance. First, and obvious one, is to move to a new GUI system. Drawing will be definitely faster, but repainting slower, because there is now way to use Graphics class in terms of WinForms. Like, you can't just call FillRectangle(brush, x, y, w, h) and repaint control. You will need to create objects, add Image/Button/etc classes and it should be done on every PerformLayout event (like resizing a control). It's just overhead. But it can be done if all methods in Graphics will return GameObjects so you can use it later for repainting. And I think it's bad idea, it will be something different other than winforms.

And the second option is kinda harder. I need to do something like SpriteBatch in XNA/Monogame, It will allow me batch controls when I need to repaint them. I believe speed can improved like 2 to 3 times. The only way to achieve it is write plugins for every build target in OpenGl where I'm not really competent.

So I'm kinda stuck right now. May be Unity devs will give us something later, like GL.DrawArrays, I dunno.
There still some bugs, tons of missing features and also I'm working on other the project, which consuming most of my time.
May be if you have some ideas, or you can offer any help, that would great.

@Armitage1982
Copy link
Author

Thank you for taking the time to answer me!

I really wish I could help on this project, because I think it's great, unfortunately I don't know if I would be of any help and especially I lack free time to do it too.

Also, ensuring compatibility for iOS "Metal", Android and WebGL is more than time consuming (I've had the problem lately with a compute shader and a StructuredBuffer under Metal, these differences are just an absurd waste of time).

@Meragon
Copy link
Owner

Meragon commented Jun 25, 2018

Okay then. This project will slowly improve anyway, until we decide to move to some other framework or graphic library. And then I'll probably stop commiting here.
I'll keep open this issue if someone will have any suggestions about improving performance.

@Armitage1982
Copy link
Author

OK, when you talk about another graphic library you mean something like bgfx or something ?

@Meragon
Copy link
Owner

Meragon commented Jun 25, 2018

Looks not bad, but I still thinking. As Unity plugin version for web build is deprecated for most browser, we considering to move to anything with WebGL support as target platform. And preferably using C# as primary language.
So, I checked Bridge.Net + Pixi, porting current version of UnitWinForms seems really hard for this. Need more researching on this one.
Also Godot with c# support is out now, need to check it out.
Not really many options, it's possible that project I'm working on will be totaly rewritten using different language, like JavaScript.

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

No branches or pull requests

2 participants