Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by amirabiri · Mar 07, 2012 at 10:24 PM · performancewebplayer

Severe performance problem with 2 instances of web player

The nature of this discussion has gone beyond the scope of the Q&A format, so I have created a forum topic to discuss it further. Please continue the discussion there. If & when we have a more conclusive answer I shall post it here.


I'm not sure if this is a question for Unity Answers or if it's a bug report, but I thought I'd verify here before I submit a bug.

Basically we have a small unity build that acts as a small element on a web page (246x246 pixels). It's neat and works beautifully and takes the whole website up a level. The idea is to have several of these scattered on each page. These are very simple small projects, basically replacing several static images with rotating 3D models.

When there was only one instance of the unity web player on the page, the performance was reasonable. However once I introduced a second one, we got a huge performance problem all of a sudden.

The problem occurs when scrolling the browser window. When not scrolling both instances seem to perform reasonably and CPU usage is reasonable. If scrolling slowly the scrolling is choppy and there are many small freezes. When scrolling fast the CPU usage goes through the roof and the browser hangs or crashes.

I tried Flash instead, so exact two scenes exported to Flash placed in the exact same places on the page (2 instances) - performance wasn't perfect but there were not huge CPU usage spikes or hangs. I've tried removing all JS from the page (hardcoded the embedded HTML result) - no difference.

So is there some known problem / is it likely something in our project ? Or is this likely to be some bug in Unity?

[1]: http://unitywebplayertest.abiri.org/

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image by0log1c · Mar 09, 2012 at 09:28 PM 0
Share

I am also interested by this question. I use Firefox and I already noticed that running 2 Unity instances, even in different browser tabs will cause major lag. Your 4 instances test is enough to get my browser hanging at work, and we have bombs for computers, so any hint to correct the issue would be greatly appreciated :)

avatar image amirabiri · Mar 10, 2012 at 01:00 AM 0
Share

@BY0LOGIC Thanks for the feedback - I'm glad to learn it's not just me! :-) Can you provide the details of your spec / what browser(s) you've used? (but please do so in the new forum topic I created)

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by amirabiri · Mar 09, 2012 at 12:26 AM

OK I think something is very wrong here... I just performed a very simple check and the results are frightening. I created a very simple project with a simple spinning cube, built it as a web player and uploaded to a little test page I created.

The result is that with 1 instance the browsers sort of perform reasonably. Scrolling is choppy but they survive.

However with 4 instances of the player on the page, when using the mouse to scroll, FF 3.6 and IE 8 perform badly but barely hang in there. Chrome (17.0.963.78 m) totally hangs. In fact I couldn't even begin to scroll the page in Chrome, it didn't respond.

I have uploaded the test to my server so that perhaps other people can try it and report the performance they are getting. I will also submit this as a bug report to the Unity team now.

Warning: This test can cause your browser to hang! Before you click this link make sure any work you have open in your browser is saved!

Unity Web Player Test

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Bunny83 · Mar 09, 2012 at 01:36 AM

I've tested both versions without major problems. The one-player-version runs fine. The four-player-version also runs fine, but when scrolling it gets a little bit choppy, but not too bad. CPU usage usually is around 1-2% but when scrolling it raises to 35-40%. I have a quite old PC (Pentium D dual core 3GHz, 4GB ram, Nvidia 8600 GTS [256MB i guess :D], 32Bit-WindowsXP, FF 4.0 [i don't use FF's plugin-container!] )

I would expect a little hiccup due to device-context-repositioning. Since Unity is hardware accelerated, every plugin uses a hardware device context which isn't made for being moved around ;)

Comment
Add comment · Show 13 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image amirabiri · Mar 09, 2012 at 01:52 AM 0
Share

Did you try it in Chrome?

avatar image Bunny83 · Mar 09, 2012 at 03:56 PM 0
Share

No, I don't use chrome. I love a lot of google's services (web search, maps, translator, youtube, code) except chrome ;)

$$anonymous$$aybe some day i switch, but my webbrowser isn't my most important application ;)

avatar image fafase · Mar 09, 2012 at 04:06 PM 0
Share

Tried on Firefox 10.0.2, Chrome 17.0.963.78 m and even as part of the remaining 1% of the world I tried on Explorer 9. I don't have Opera. And it worked on all 3, a little stopping in the middle but no big issue. For my specs, I have i2 duo 2,66, 4GB, GE force 7300, windows7 64bit. So not an amazing machine.

avatar image amirabiri · Mar 09, 2012 at 04:12 PM 0
Share

@Bunny83 That's fair enough, but when building a website we need it to support all major browsers, and Chrome is one of them. Plus I personally found the performance on Firefox to also be unacceptable (3.6 in my case).

avatar image amirabiri · Mar 09, 2012 at 04:15 PM 0
Share

@fafase Thank you for the feedback :-) Your chrome version is identical to $$anonymous$$e which implies that it might be environment-specific.

Show more comments
avatar image
0

Answer by amirabiri · Mar 10, 2012 at 12:56 AM

I have updated the test page to include a 12-instances page, and also started a results table based on the reports submitted here.

Click here to go to the test page.

The nature of this discussion has gone beyond the scope of the Q&A format, so I have created a forum topic to discuss it further. Please continue the discussion there. If & when we have a more conclusive answer I shall post it here.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image save · Mar 10, 2012 at 01:16 AM 0
Share

Even though it's possible to run several web players inside one page, its purpose isn't whilst perfor$$anonymous$$g well. If you want several web players on one page just go with a more reasonable approach where you inactivate the ones that isn't used. The web player will always perform at its best as a singleton - at fullscreen loaded from a website, as inline plugins demands much more attention to render.

avatar image amirabiri · Mar 10, 2012 at 01:26 AM 0
Share

As I've explained elsewhere activating / inactivating isn't an option for us since we want to provide multiple rich content assets on a page (replacing static images).

However I understand what you are saying and if the Flash route fails we will drop the "sprinkled" approach and create a section of the site that displays all 3D models in one player where the user can flip between them. It's not the experience we wanted to provide our users with, but it's better than causing some of them browser crashes and hangs!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Stuttering web player 1 Answer

Does a large number of components will affect performance ? 2 Answers

Performance Differences in Standalone player versus Web Browser? 2 Answers

Web player performance problem on MAC OS X 3 Answers

Static Batching Performance issues on WebPlayer on Low end PC 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges