Opened 10 years ago

Closed 9 years ago

Last modified 9 years ago

#4709 closed bug (fixed)

[Kaleidoscope] makes system too slow to react on user's input

Reported by: mpanasyuk Owned by: stippi
Priority: normal Milestone: R1
Component: Servers/app_server Version: R1/alpha1
Keywords: Cc:
Blocked By: Blocking:
Has a Patch: no Platform: All

Description

Media threads also don't get enough CPU power.

How to reproduce:

  1. Open some video/sound file in MediaPlayer.
  2. Hit play and confirm there are no dropped frames or sound glitches.
  3. Open Kaleidoscope.

Media playback will be affected. To make impact even bigger open Kaleidoscope fullscreen. Also you can chose more complex media file for playback, one that will load CPU more.

Haiku R1/alpha1 (Revision 32975)

Attachments (2)

sysinfo-output.txt (1.3 KB) - added by mpanasyuk 10 years ago.
Kaleidoscope.zip (15.6 KB) - added by mpanasyuk 10 years ago.
Kaleidoscope BeOS R4 demo app

Download all attachments as: .zip

Change History (15)

Changed 10 years ago by mpanasyuk

Attachment: sysinfo-output.txt added

comment:1 Changed 10 years ago by mpanasyuk

Forgot to mention - VESA mode. Can't test not in VESA because my graphics card is not supported (nVidia 8600GT)

comment:2 Changed 10 years ago by mpanasyuk

Component: - GeneralApplications

comment:3 Changed 10 years ago by axeld

Version: R1/pre-alpha1R1/alpha1

What is "Kaleidoscope" and where can one get it? It definitely sounds like a bad behaving application, but I'd like to confirm that assumption.

comment:4 Changed 10 years ago by mpanasyuk

Sorry for not mentioning that earlier. It's a demo app from BeOS R4.x

comment:5 Changed 10 years ago by axeld

Is there any way to get a copy of this demo app?

Changed 10 years ago by mpanasyuk

Attachment: Kaleidoscope.zip added

Kaleidoscope BeOS R4 demo app

comment:6 Changed 10 years ago by axeld

Component: ApplicationsServers/app_server
Owner: changed from nobody to stippi

Thanks! It looks like a locking contention problem within the app_server (probably due to the slow anti-aliasing lines drawing).

comment:7 Changed 9 years ago by axeld

Resolution: fixed
Status: newclosed

Should be fixed with hrev35472.

comment:8 Changed 9 years ago by Garjala

I do not think it is fixed. Tested with hrev35528 and real hardware (Athlon64 3200, 2 gigs of ram, Radeon X800 Pro, Soundblaster Audigy).

  1. Start playing mp3 with mediaplayer
  2. Start Kaleidoscope

Now sound almost stops. You can hear few second of sound every 5-10 secs. Mouse cursor also randomly starts updating only every 3-5 secs making Haiku use very hard. Mouse cursor problem comes and goes while Kaleidoscope keeps running, but sound stays like that.

Both problems disappear when Kaleidoscope is closed.

comment:9 Changed 9 years ago by mmadia

It seems to be a thread priority issue, Kaleidoscope's app_server thread is of priority 15. On a single core machine that could be preventing MediaPlayer from having enough cpu time. Manually reducing Kaleidoscope's app_server thread priority to 5 helps.

comment:10 Changed 9 years ago by axeld

Which makes this a different problem. The interface still feels not perfect when Kaleidoscope is running, but it's definitely usable -- the maximum lock holding time should be shortened a bit more.

comment:11 Changed 9 years ago by Garjala

Tested that and it seems that changing Mediaplayer "event queue runner" thread to 20 pretty much fixes the sound. Changing Kaleidoscope to 5 on the other hand only has small effect to sound even if I change all of its threads to priority 5. Neither of the priority changes fix odd mouse behaviour while Kaleidoscope is running.

comment:12 Changed 9 years ago by axeld

Indeed, reducing Kaleidoscope to 5 shouldn't help a lot - the app_server thread is the expensive one (running with priority 15 as well).

I've further reduced the lock holding time in hrev35548; there is already a ticket about too low MediaPlayer priorities, so that should be covered.

comment:13 Changed 9 years ago by diver

I tried to run Kaleidoscope in hrev35548 (vbox) and found out that if you start clicking on leaf menu in the same time - ~30% of such clicks will be ignored (Deskbar didn't react), is it intended?

Note: See TracTickets for help on using tickets.