OpenGL and Workbench Canvas News

Recently, a bug that caused excessive memory usage and slowness (specially in large models) in Workbench has been fixed in its canvas. From the testing I’ve done, the speed for displaying diagrams seems to scale much better and dragging around tables in large models is doable in an acceptable speed. This fix is in the upcoming releases of the 5.0 and 5.1 alpha versions of Workbench.

Apart from that, we’ve been doing some work on reintroducing OpenGL support to the Workbench canvas. Unlike the initial implementation, this time OpenGL is used directly instead of going through Cairo’s experimental (and not quite reliable) support through the Glitz layer. This means that in machines with a recent graphics card, hardware acceleration will be used and working with large diagrams will be a lot smoother and faster. Of course, software rendering backends (GDI+, Quartz and Xlib) will still be supported and used in case OpenGL is not the best option.

We still use Cairo to render everything (or most things) as before, but now the pre-rendered object bitmaps are uploaded to the video card and displayed through textures. Although the “software” rendering we were using was also hardware accelerated in most cases (because GDI+ et al are implemented with acceleration by the OS), using OpenGL textures seems much faster than blitting these bitmaps to screen in the old way. Naturally, this also opens the door for some totally useless and cool eye candy 🙂 But that’s for after we get the essentials done…

There are still problems to be worked out (some of the transparencies are not working well and there are some refreshing glitches), but you can try it with the --force-opengl-render option.

Author: Mike Lischke

Team Lead MySQL Workbench

5 thoughts on “OpenGL and Workbench Canvas News”

  1. Hi Alfredo,
    I have performance problems with WB 5.0.29. Although I have a ATI card with OpenGL 2.1 support After editing about 10 table in WB, MySQL WB becomes very slow so that I always restart WB. What might be the problem? how –force-opengl-render option is used?

  2. Hi

    What kind of performance problem? Can you describe what
    happens and also take a look at the memory/cpu usage of WB in the task manager? 10 tables shouldn’t be a problem for any kind of rendering or video card, so that might be a bug somewhere.

  3. I have an ATI HD3450 card with OpenGL 2.1 , but 5.0.30 couldn’t find it either; it still use GDI rendering.

    Before the ATI card , I used the onboard Intel graphic chip. I have around 40 tables and MySQL Workbench is barely usable.
    Sometimes a click would take around 5 seconds to be effective.

    Now I am waiting for my ATI card to be recognized by Cairo/Workbench …:(

  4. “5 seconds to a click to be effective” is not caused by the graphics card, it’s probably something else. Please check and report memory usage when things are slow and try setting the undo stack size to a low value such as 10 in the Options dialog.

  5. Now I cannot reproduce it since I have switched to an ATI card. ^_^ It’s still using GDI rendering but at least the performance is good enough now.

    I have another WinXP with an Nvidia GeForce 6600LE supporting OpenGL 2.0 as reported by OpenGL Extension Viewer. 5.0.30 still cannot detect OpenGL and uses GDI rendering. This is what puzzles me most.

    I will still pay attention to the memory usage, however…

Leave a Reply