Ribbon performance |
Post Reply |
Author | ||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
Posted: 03 June 2006 at 6:12pm |
|
This may sound stupid but I noticed that the performance of the Ribbon is way better if an Office 2007 application is also running. This behavior is reproduceable, start the RibbonSample and move the mouse fast over the groups, the highlighting feels a little bit sluggish, non responsive. Now start Excel or Access Beta1 TR or Beta2, minimize the Office app and move the mouse cursor over the ribbon groups, very fast and responsive. Actually the whole application is faster, resize the RibbonSample without an Office app running and with, it is again way faster if an Office app is also running. I know that this may sound stupid, but the performance increase is amazingly. To be honest if anybody else would tell me that story I would believe that he is stupid. I guess that there are others who have the Office 2007 Beta installed, so please try it out.
|
||
Codejock support
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
I should rename the topic title because it's not only the Ribbon, I can also reproduce it with the Utilities.StylerBrowser.exe which doesn't have a Ribbon. It affects the "Office 2007" and "Ribbon" theme. |
||
Codejock support
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
Does anyone else have the same performance problems with the Q2 (10.2) Ribbon/Office 2007 theme? It's way slower than Q1 (10.1) was, tested on different PCs. But as soon as an Office 2007 app is running it's as fast as Q1 was. |
||
Codejock support
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
Could someone from Codejock please have a look at this because currently the Ribbon / Office 2007 theme is too slow to be used. I've tested the precompiled sample as well as the release build on several PCs (Win2000 and XP, dual and single CPU) and it's mega-bad. Office 2007 Beta is installed on one PC and as soon as I start Excel/Access the Ribbon sample runs way faster, as fast as Q1 was.
|
||
Codejock support
|
||
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
|
Does it happen if you run the EXEs provided here: http://www.codejock.com/downloads/samples/ribbon.asp
Maybe you can try a few and see if the results are the same. |
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
Yes, I've first tested the precompiled samples, then the 10.20 Evaluation with my own app, then I've build the Ribbon Sample and my own app with the 10.20 Release. The Q2 Ribbon / Office 2007 theme is currently a show stopper It's not only slow on a single PC but on every one I've tested it. But as soon as I start Excel 2007 Beta 1 TR it is like 10 times faster. This is reproduceable again and again, I've also rebooted the PC many times in the meantime. Start Ribbon sample: Slow Start Excel 2007 Beta 1 TR: Fast Close Excel: Slow Start Excel: Fast
I've no idea what Excel does
P.S.: It's the same with the Utilities.StylerBrowser.exe sample and Office 2007 or Ribbon theme. |
||
Codejock support
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
Ok, those performance problems don't occur on a US Win2K system. They occur on German Win2k and WinXp systems with Office 2007 installed on the XP system. I'll try to track the problem down tomorrow, any idea what could cause the problem? Are there any code parts that I can disable to find the bottle neck? Edit: As long as there are no tabs everything is fine. Edit: void CXTPOffice2007Image::DrawImage(CDC* pDC, const CRect& rcDest, const CRect& rcSrc, const CRect& rcSizingMargins) const causes the performance problems, the DrawImagePart calls. Edit 2: CXTPOffice2007Image::DrawImagePart, XTPImageManager()->AlphaBlend |
||
Codejock support
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
CXTPImageManager::AlphaBlend causes the performance problem. AlphaBlend calls into msimg32.dll -> AlphaBlend which itself calls into gdi32.dll Is it possible that Excel replaces the gdiAlphaBlend function with their own implementation? ------------ The AlphaBlend implementation doesn't seem to have changed since 10.10, was it also used in 10.10? Maybe the source and destination are incompatible now? |
||
Codejock support
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
If I set the color depth of my screen to 24-bit everything works fine, but as soon as I set it back to 32-bit it's slow as hell. The problem is the AlphaBlend function where the source and destination seems to have a different color depth if I set my screen settings to 32-bit. If the DCs are incompatible AlphaBlend is known to be slow. Could you please fix this ASAP? Thanks |
||
Codejock support
|
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
All this very strange... Nothing changed from 10.1 , now just ribbon have more images. Yes, may be office activate some acceleration for AlphaBlend... but have no idea what can be done... Anyway we plan to improve drawing by adding double buffer and not redraw whole ribbon when something was changed. |
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
How many and how large alpha bitmaps did v10.1 use and how many v10.2 now? The tabs are a large alpha bitmap now and I think it wasn't one in v10.1. I guess you are using AlphaBlend to use a common set of bitmaps for different themes (Luna / Obsidian), couldn't you instead use non-alpha bitmaps? Have you been able to reproduce the performance problems with a 32-bit color depth?
That won't help when resizing the window because the Ribbon than needs to be redrawn.
P.S.: I did a quick hack, BOOL CXTPImageManager::AlphaBlend(HDC hdcDest, const CRect& rcDest, HDC hdcSrc, const CRect& rcSrc) const which solves all the performance problems. The result doesn't look pretty but I guess for many bitmaps transparency could be used instead of alpha blending. |
||
Codejock support
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
I've just tested it on another workstation and even with a 32-bit color depth everything works just fine. The only difference that I could find was that gdiplus isn't installed on that workstation. But the msimg32 and gdi32 dll's are the same, so I'm not sure if it's that whats causing the problems. |
||
Codejock support
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
Oleg, this is a little bit strange, I've tested it on 6 workstations, on 3 it's slow and 3 are ok. The only thing that they have in common is that 3 have LCD monitors and 3 regular monitors. On the workstations with a LCD monitor it's slow, but only if the color depth is not 24-bit. Let me know if I you want to test anything else or need additional information. |
||
Codejock support
|
||
gwoin
Groupie Joined: 09 September 2004 Location: France Status: Offline Points: 52 |
Post Options
Thanks(0)
|
|
Did you think about your graphic board's drivers? May be my question could sound stupid for a 2D rendering, but on some integrated cards or on low-cost cards, the drivers could be very slow to compute alpha rendering |
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
I doubt that there is any hardware acceleration for alpha blending, GDI is solely software rendering. The workstations also all have different graphic cards, from Matrox Millenium 550 / G450 to NVIDIA GeForce and a FX6600. The problem occurs on several workstations, so I can't believe that I am the only one who has problems with the performance. |
||
Codejock support
|
||
gshawn
Senior Member Joined: 04 October 2004 Status: Offline Points: 227 |
Post Options
Thanks(0)
|
|
Still, I do believe the driver question is a valid one. I would check that you have the latest driver on each workstation. Also, you did not mention checking the video hardware acceleration setting. From the Display Properties > Settings > Advanced > Troubleshoot, make sure that the hardware acceleration is set to Full and enable write combining. I hope this helps. |
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
Every workstation has a different graphic card, but they all have the latest drivers. Also AlphaBlending was introduced many years ago, so I doubt that a nVidia Quattro is the bottle neck here
I've tried that too, I've set the hardware acceleration to 0% on a workstation where everything is fine and there was no difference. Have you tested it on a LCD? |
||
Codejock support
|
||
Sven
Senior Member Joined: 21 August 2003 Location: Germany Status: Offline Points: 127 |
Post Options
Thanks(0)
|
|
Maybe a ClearType issue?
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
Windows 2000 doesn't support ClearType and it's definitely the AlphaBlend call that causes the problems. So no need to speculate any longer |
||
Codejock support
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
Ok, we've tested it on 2 more workstations and 1 laptop and the result is the same. It's awful slow on LCDs and the laptop. And as I already reported 2 days before it is the AlphaBlend call that causes the performance problems if the color depth of the screen is not 24-bit, because then the source and destination DCs are incompatible! The Q1 Ribbon/Theme wasn't useable because of bugs and limitations and Q2 isn't useable for about 50% of the users. After 2 months it would be nice to get a version that can be used for real world software. |
||
Codejock support
|
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
Could you please confirm this problem and let us know when a fix is available.
|
||
Codejock support
|
||
gshawn
Senior Member Joined: 04 October 2004 Status: Offline Points: 227 |
Post Options
Thanks(0)
|
|
I can take some time and test it on an LCD... give me a few minutes.
|
||
gshawn
Senior Member Joined: 04 October 2004 Status: Offline Points: 227 |
Post Options
Thanks(0)
|
|
Just tried it here and it runs great, sorry... Acer AL1916A 19" LCD The compiled Ribbon sample runs great in either 16-bit or 32-bit; I was unable to notice any slowdowns. I'm at a loss as to what to try next... Are there any specific tests or files versions you would like me to check? |
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
We've only tested it on 2000 and XP, on 9 different workstations and laptops, there was a huge performance penality on 5 of them and it runs great on 4. The only thing that they have in common is that those 5 have LCDs and the other 4 CRTs. It was also independently tested by a customer, "I tried it here at home on my laptop and it's lagging something awful! This PC is about the same as the one I have at work, 2.8Mhz, 512mb, but it has a LCD that I'm running at 1400x1050 32bit. I notice when I move around the ribbon where the highlight should follow me, the CPU usage goes to 100%." We've a bit of a problem here
|
||
Codejock support
|
||
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
|
ok, we will try to optimize ggraphic to remove alpha layer from some bitmaps. Largest is Office2007_RibbonGroups.bmp so will start from it. Can you uplease 1. download these bitmaps: replace them in Source/Ribbon/res folder, 2. open sampe, replace void CMainFrame::RecalcLayout(BOOL bNotify /* = TRUE */) to void CMainFrame::RecalcLayout(BOOL bNotify /* = TRUE */) it decrease perfomance a lot.
3. rebuild sample and check perfomance.
Thanks |
||
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
||
Barto
Groupie Joined: 27 February 2005 Location: Germany Status: Offline Points: 60 |
Post Options
Thanks(0)
|
|
Sample (compiled by myself) Seems to work here, too. (I don't have Office 2007 installed) Pentium 3.2GHz, 1GB RAM, WinXP SP2 (en), GeForce 6600GT (PCI-X), Samsung SyncMaster 204Ts (LCD via DVI) |
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
oleg, the non-alpha Office2007_RibbonGroups.bmp has increased the performance alot, although it is still noticeable slower. Thanks. I understand that alpha bitmaps make it easier to support different color schemes without changing the bitmaps and that there would be a size increase if you would make a set of bitmaps for each color scheme, but have you considered to use PNGs for the graphics? libpng and zlib can be used for free, even in commercial products. That would reduce the graphics size from about 1.4 MB to 200 KB without any losses. You can also use GDI+ to load PNG resources. http://www.codeproject.com/bitmap/PNGView.asp http://www.codeproject.com/vcpp/gdiplus/cgdiplusbitmap.asp
|
||
Codejock support
|
||
Marcus
Groupie Joined: 04 June 2006 Location: Germany Status: Offline Points: 42 |
Post Options
Thanks(0)
|
|
Oh, please don't start using additional libraries like zlib in the toolkit! A lot of developers, like me, prefer clean, simple, self-contained solutions! Adding unnecessary dependencies will only bloat and complicate everything! |
||
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
|
@Marcus: GDI+ can also be used to load PNG resources, you would only have to ship the gdiplus.dll with your application. libpng/zlib is just an other option. Office 2007 and Vista also uses PNG for its icons. Currently LCDs have a resolution of 96 DPI but soon we will have 240/320 DPI screens and then uncompressed bitmaps are unuseable, or would you like to have 15 MB of Ribbon bitmaps?
What would be the problem if libpng/zlib are added to the workspace? There would just be 2 additionally projects and you could compile the toolkit as always and get a lib or dll. That doesn't complicate anything. |
||
Codejock support
|
||
Marcus
Groupie Joined: 04 June 2006 Location: Germany Status: Offline Points: 42 |
Post Options
Thanks(0)
|
|
Every library you're adding leads to more compatibility issues. GDI+ doesn't work on Win95, can you compiler zlib as a 64 bit dll?! It always gets messier as you first think.
|
||
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |