Speed of XAML

Is it possible for you guys to give us a realistic timeline on when XAML wil be ready to be a actual viable option to develop applications for

E.g when will the whole framework standardize and when will we be able to develop apps that won't run at snail speed

Thank you very much,

Jaco



Answer this question

Speed of XAML

  • Pock

    There are two kinds of performance issues in any software. One is systemic. The architecture is just slow and there's nothing you can do about it. Or the architecture is designed for something else, and it can't be used to build Application X. In WPF you can't build "Halo" and get XBox performance.

    The second kind is perf bugs. A perf bug is something where if you make a small change to the code, it gets much faster. Often there is a workaround. The key characteristic of a perf bug is when you look at the profile you see some method or small number of methods taking 20%+ of the time. Or the working set gets really big when you watch it with Process Explorer.

    The problem is, if your app is slow it is impossible to tell whether the issue is systemic or "just a bug" without profiling. Those of us who have been working on WPF for a while have some instincts about what to do or not do, but I can't apply them without seeing your app and/or the code, or at the minimum some profiling results.

    Why would a medium size app be slow First thing I would look at is the CPU usage when the app is idle. If it is still ticking over, maybe something is triggering constant re-rendering or layout. Do you have an animation running We've certainly seen bugs where animation clocks keep ticking. I think they've all been fixed, but maybe we've got a new one. What is your working set Expression starts up with a 50MB working set...comparable to unmanaged apps of similar complexity. If your medium size app is sitting at 100MB...something is fishy.



  • Fredley

    I assure you Expression is written using WPF. If you want to confirm, use a tool that dumps the dlls loaded by a running process. You will of course see Gdi32.dll which is being used by Windows to render the window frame, but no gdiplus.dll.

    We need to publish more best practices, you will see a few things in my blog. But the number one practice in all frameworks is to profile your application. I do perf work all the time and I am regularly surprised by the results when I first profile my code. The processor architecture, the operating system, the languages and the frameworks are all too complex to be able to make guesses about performance without profiling.

    Some very basic things: is your code ngen'd or being JITted If you haven't rebased your dlls they may be conflicting with system dlls in which case the JIT will recompile your code on the fly even if you have ngen'd it.

    It is surprisingly easy to allocate a lot of memory using CLR constructs like foreach...this can cause garbage collection to bog down your application. If you use a tool like Process Explorer you can see the %time spent in GC.

    And finally, every WPF build I pick up internally I get the enjoyment of seeing it get faster. Expression is noticeably faster on the latest builds even where the Expression team has not done any perf work.



  • ManniAT

    Here are a couple of links

    http://www.mobiform.com/

    http://www.microsoft.com/products/expression/en/interactive_designer/id_free_trial.aspx

    There are other applications that also have been in development for a while, but are not public yet.

    In terms of UI, Expression Interactive Designer is a pretty large application and has a lot of functionality, and the interaction with it is very nice.

    Could you give us more details as to what issues you ran into/what your UI looked like We are in the finishing stage right now, so time is short if you have issues you would like us to address. I am curious about the XAML reference, are you running into issues with parsing or compiling

    Thanks,

    -Pablo


  • Queen

    Well, if I have to be specific, everything! From typing in text into a textbox (there is always a delay!) to animation that is super slow!

    My problem with Avalon is the speed, just the speed. Other than that, I do not have a problem with Avalon. It is a good framework, minus the speed that the controls are being rendering, and as for the Expression Designer, it is kind of slow (and I think it is using GDI+, seeing as Vista is also using GDI+, and not Avalon)

    Thanks,

    Jaco


  • Pras

    Let me give my 2 cents here ;-)

    We have built our first proof of concept using avalon and we feel it's really great! great framework and 'flow'.

    However, we too feel that applications feel sluggish. On one simple page we have 3 listboxes and implemented drag and drop of items between them, using the adorner layer. We fill one box with about 100 items that all have 3 events on them (mouse up, down and move). Also, there is a nice gradient in the background and a border around the listbox. Basically, you can already feel it being slow when scrolling through the listbox. The dragging then is suddenly surprisingly smooth.

    Placing a bitmap effect on the listboxes (for a glow or a drop shadow) brings the entire UI to a crawl, but I read that is a known issue.

    But still.. scrolling through a listbox with only 100 items.. That should be blazingly fast, shouldn't it



  • bcristian

    Regarding Expression Interactive Designer - it's based on Avalon and I don't think it's using GDI at all.


  • PharmerNick

    I am using the Feb CTP build. I actually did not know of other applications that are already in trial testing phases. (Could I perhaps have a link to one please ). My problem is with the speed that XAML performs. We are forced to go back to Win32 as our interface we are building is too slow to be a realistic UI environment for our users.

    I posted this request as I would like to know when Avalon will be in its finishing stages or at least, when can we expect good performance from Avalon.

    Jaco


  • TheBestKeptOne

    Thank you John for you're reply, but...

    That is exactly what my problem is as well. I agree, what you are able to do with Avalon is fantastic, but it gets sluggish far too easily. And worst of all, Avalon is hardware rendered. What I don't get is this, if you are only using Avalon controls, and mean just the objects exposed in the framework, why does it then perform so badly when you try and build a moderately complex application


  • Adominguez

    Its GDI+. They basically wrote everything from scratch using their own "framework". That is why I asked, are you dead sure Expression Designer is written entirely using WPF. If EID is using Avalon, I am very impressed at the speed at which the application performs, and gives me faith in Avalon again. But, EID still does not perform on par with WIn32 apps, although it may seem ludicrious that I want Avalon to perform as quick and be as responsive as Win32, well, my expectation is justified. Avalon is after all, being hardware rendered.

    On that note, is there then a "best practices" and "do's and don't do's" information out there that might then help me with my problem

    Thanks,

    Jaco


  • berk-atabek

    I know now what our problem is, thank you very much. It is still not performing as good as it should, but seeing as you guys are still working to improve the speed, it is bearable. But, to overcome my problem, I need to be able host a Dialog Window with rounded edges! Please can you give me an indication when this will be implemented As I have seen I am not the only person as to request this much needed feature.

    Thank you very much,

    Jaco


  • Ksenia Mukhortova

    There are many applications in development today, and some are even available for evaluation. The February CTP is the build you should use. There are companies that have been developing WPF applications since PDC 2003, and they are fairly well into their development at this point.

    Is there some specific issue you are running into with XAML usage (instead of WPF in general, 3D, or some other area)

    -Pablo


  • Nick_Zozzo

    If you have a 100 item ListBox and scrolling is slow, we need to see it. The fact that dragging is fast is a sign to me that you've got a "perf bug" specific to the ListBox that could easily be fixed or worked around. There have already been a couple of perf fixes specifically around scrolling ListBoxes since the Feb CTP.

    It is probably not rendering that is slow. What kind of items are in the ListBox If they are templated controls created with data-binding...you could have a Template that generates too many Visuals (Expression used to have a Button that resulted in 30 Visuals each). Try the code from my blog: http://blogs.msdn.com/johngossman/archive/2005/08/04/447932.aspx

    and see how many Visuals are in your app. What is your working set Do you have any animations running Without profiling, we can't tell what is slow.



  • Paraclete

    How certain are you Windows Vista is supposed to be based on Avalon, but its not. So what gives
  • Bill Dafon

    EID is created using WPF. Its the first major application to be created using WPF.

    Its not clear to me what graphics API Vista has been created with. Im pretty sure its not WPF.

    Does anyone know


  • Speed of XAML