How to improve performance when there are many TextBlocks in ItemsControl items?

   Hi,
   I'm trying to find a way to improve performance for a situation when there is an ItemsControl using UI and Data virtualization and each item on that control has 36 TextBlocks. Basically the item is a single string. There are so many TextBlocks
to allow assigning different brushes to different parts of the string. Performance of this construction is terrible. I have 37 items visible on the screen and if I try to scroll up or down it scrolls into the black space and then it takes a second or two to
show the items.
   I tried different things. For example, the most successful performance-wise was to replace TextBlocks with Borders and then draw bitmaps. In other words, I prepared 127 bitmaps for each character (I need ASCII only) and then I used those bitmaps
to set Border.Backgrounds. It improved performance about 1.5 - 2 times but it consumed much more memory (which is not surprising, of course). Required amount of memory is so big that it throws OutOfMemoryException on 512MB emulator but works on 1GB. As a result
I don't thing it is a good solution.
   Another thing that worked perfect is to replace 36 TextBlocks with only 6 TextBlocks. In this case the performance improvement is about 5 - 10 times but I lose the ability to set different colors to different parts of the string. It seems that
the performance degrades dramatically with the increase of number of TextBlocks. Is there another technique to draw strings where literally each character can be of different color with decent performance?
Thank you
Alex

   Using Runs inside TextBlocks gives approximately the same improvement as using bitmaps 1.5 - 2 times faster but it is not even close to the case with just a couple of TextBlocks in the ItemsControl item. Any other ideas?
Alex

Similar Messages

  • How can I improve performance when scopes are open?

    How can I improve performance when scopes are open?
    When Color correcting, performance severely lags, stalls, freezes!
    Nothing to complex...simple 3 way color corrector, occasional curves filters.
    I am constantly waiting for the timeline to update as I move around....sometimes as long as a minute or so.
    I'm on brand new 2.7 Ghz 12-Core MacPro with 64 GB of RAM
    Thanks in advance.
    Jay

    http://forums.adobe.com/thread/1369260?tstart=0

  • How to replace sky when there are trees in the photo

    I have several photos taken outdoors with a dull sky. I also have several sky shots to supply the blue sky; with or without clouds. I know a couple of ways to do  that --as long as the horizon line is clear, such as roofs, etc.  My preferred method is to use a tool; e.g., Magic Wand, to select the sky area and then copy/paste a blue sky image using Ctrl+Shift+V command. This makes the copied sky inserted into the original image and I'm happy with the results.
    But when there are trees or other bushes between the camera and the sky, problems begin.  No matter how carefully I try to include all the "holes" in those trees, the end result contains white spots where the selected section failed to follow the tree "holes".  Anybody know how to fix these types of problems?  I am somewhat familiar with layers-- which I have tried to use to solve this problem.
    Using PSE-12 on Windows 8.1
    TIA,
    Pete Grant

    Pete,
    There are several ways to do this. In my experience the Alibony technique works well. You will be able to use your "good" sky pictures:
    Watch Lesson 12: Quick Colorless Sky Replacement | Alibony Lessons for Photoshop Elements Episodes | How To Videos | Bli…
    As I pointed out to you on June 5, 2014, this is how I do it after watching the Alibony video.
    Open your picture (A) (File>open), and open the replacement sky picture (B)
    On the sky picture (B), go to Select>all from the menu, then Edit>copy to place it on the clipboard
    Go back to your picture (A), then Edit>paste. The new sky (B) should come in on a new layer
    With the move tool, use the corner handles to reduce the size of the sky (B) to cover the old sky on (A)
    In the layers palette, set the blending mode of (B) to darken
    Set the foreground color chip to white
    Get the Gradient tool out of the toolbox, and drag a foreground to transparent, linear gradient from below up to the top of the tree line, while holding down the shift key.
    With a soft white brush, at reduced opacity, gently paint the horizon a bit, as we want the horizon to be a tad lighter than the rest of the sky.
    If necessary, add a few clouds with the Return to Eden set.

  • Howe can I tell when there are no references to an object?

    Hi all,
    Is there any way for me to know when there are no references to an object without using finalize()?
    I want to pool created objects when it is safe to do so.
    finalize() won't work since it is called only once for every object instance.
    Regards,
    Marcus

    If you are trying to establish an object pool by placing the objects back in the pool when there are no references to the object, then I am afraid you are out of luck.
    If there were no references, then you would not have a "handle" on the object to be able to manipulate it in any way (like putting it back in the pool).
    If you are talking about something else, then the classes in java.lang.ref.*, might be of use.
    If you are really trying to pool objects, then you should have some sort of "close" method in the objects that is called when they are no longer needed and can be returned to the pool.

  • How to improve performance on SD document with over 1000 line items

    Dear experts,
    A lot of our SD document contains 1500 to 5000 line items. Saving a simple change of one line item description would take 5 minutes (with or without pricing considerations). We are on ECC 5.0. Does anyone know of an existing snote or ways that would help to improve performance?
    A related question on performance tracing. I have done some tracing and notice that the time to access SQL/buffer/enqueue/RFC only amount to less than 50% (sometimes 5%) of the total processing time. What has the system been doing for the "unrecorded" time?
    Thank you and appreciate!
    -cynthia

    I would check which modules or which parts of code take the most of the processing time. You can use SE30 to check one order save.
    If it's not SQL - then it may be internal processing like inefficient loops and so on.  For example runtime of nested loops with big tables have grows exponentially.
    It may be caused by SAP code - search OSS notes for based on the module names which consume most time.
    OR it can be caused by the code in your userexits - then developers have to fix it and redesign using more efficient technique.

  • How can i export the contents of just one artboard, when there are many in a single file

    What's the best way to accomplish this?  I have four designs I want to show someone.  Also, if they're side by side and save the file as a pdf, will it just display single file?  Thanks.

    When performing a save as or export, enable the Range Radio Button, enter the pages you want.

  • How to implement cdc when there are 2 source tbls to populate one trge tb

    I am new to ODI and trying to implement CDC. Using Oracle 10g as source and 11g as target. For one to one source and target all works fine. Problem arises then I try to use two tables as source joined by PK-FK and one TRGT table.
    In the interface itself we can check Journalize data only for one table so the change in other tables can not be transfered to target Table. The option for the other table gets grayed out.
    Following are the steps I am performing.
    1. Set the Model to Simple journalizing and selecting JKM oracle simple
    2. Adding both source tables to CDC by right clicking on source tables
    3. Starting Journal by right clicking on source tables.
    Creating an interface with both journalized tables as source and mapping them to target table. However we can only check JOURNALIZED DATA ONLY option for one table. Now if I go back and make changes to both than tables. One the source marked as JOURNALIZED DATA ONLY changes get posted.
    How can we make changes made to table not marked as JOURNALIZED DATA ONLY be posted to target table.
    Thanks

    Please let me know if following are correct steps to implement what your mentioned
    1. To change to consistant model ==> double click the moel and chage from simple to consistant mode
    2. Add subscriber to the model
    3. Select the two datastore that need to be jounalized. Add them to CDC by right clicking the datastore and then start journals.
    4. Arrange the data store. Reference tabel (parent comes first). child(with foreign key comes second). This is done on model level. do we also need to change the numbe shows like 0 for parent and 1 for child
    4. Create the interface.
    5. Drag target tables. (contains columns from both tables and has inital load in it). perform mapping.
    6. Drag both source tables perform join(cant leave one table as join is required). Check jounalize data only for one table. Create another interface and now mark other source table as journalize data only.
    Call both inerfaces in Package and execute package.
    Please correct if I am wrong
    Thanks

  • Global Navigation - Sites (no longer offers the 'scroll' option when there are many sub sites)

    Hi, just completed a test migration (database attach method) to SharePoint 2010 from MOSS 2007. We have many subsites in the SiteDirectory and in MOSS2007 they would all show when you mouse over the 'Sites' TAB on the page. In 2007, when the list was too
    long for the page, you would get the little down arrow triangle and you could mouse over this to scroll the list down. I can see that in 2010 there is a new option for 'Maximum number of dynamic items to show within this level of navigation', and here you
    can set the number of items to be 'returned' for this view. The problem is that it doesnt give you the nice little down arrow so you cant scroll to the rest of the items (as you could in 2007)! Now, forgive me if I am a little blunt here, but what the heck
    is going on here when some really great and simple functionality is removed when you change the Visual Upgrade settings to v4 (i.e. 2010) and you cannot scroll up and down you list of sites now!
    I hope someone else has seen this and can offer some help/ideas to get around this limitation.
    Thanks
    Phil

    Hi Jimmy,
    No, never found an answer back then... We opted to create a 'site navigation' page, and included the different webparts to filter/show the subsites etc.
    Hope you find an easier solution!
    Cheers
    Phil
    Phil

  • HT1535 i cannot get to a screen that says library and my IPOD only shows 1 song when there are many more.  My IPOD does not show upas a adevisw under my, or any other name really ready to toss it out the door.

    I can't get my IPOD NANO to update my libreary onthe new itunes webset.  It will no recognize my older musis, it shows noting to selece onthe right side of sreen to select musid, shows nolibrary, mostly shows nothing.  Really frustrating. any help would be appreciated

    You can only sync to one computer/iTunes library. To make this your syncing computer:
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive: Apple Support Communities

  • Treemenu navigation hangs when there are many subitems

    Hi,
    I am using Treemenu (http://www.treemenu.com) for left navigation. After I have added some sub-items, after some level, I am not able to add anymore sub-items. The page just hangs and doesn't show anything. I was under the impression that one can add any number of sub-itmes in a treemenu. Please help me with this.
    Ramesh

    Your best bet is to post your problem on the message board at the site, most people wouldn't like to go through such a complex third party program to correct it:
    http://www.treemenu.com/board/
    Also you might want to take a look at known bugs at:
    http://sourceforge.net/projects/jsmenu
    and
    http://www.treemenu.com/support/bugs.shtml

  • [Desktop][Music] Artist page needs to make it easier to find an album when there are many

    If you visit an artist page with a tonne of albums like Antonín Dvořák it is difficult to find a particular album you're looking for. You have the choice between scrolling through heaps of track listings or using grid view. The former is too much to scroll through; the latter requires unnecessary cognitive effort. (I'm going to post a separate idea about that.) What I would like to see is a condensed list of rows, one album per row. Perhaps you could click on part of a row to expand it and see the tracks on it. This could be another display mode alongside the existing two modes.

    Yes, you can do it using a script. This code should do the trick:
    this.movePage(this.numPages-1, -1);

  • Connection Pool becomes unusable infrequently when there are SQL exceptions

    Hi,
    Can someone help?
    When there are many SQL exceptions thrown, the entire Pool connections on Weblogic
    6.1 sp2 become unusable, and I need to re-start Weblogic. And it gives me these
    errors:
    java.lang.ClassCastException: weblogic.rjvm.ClassTableEntry
    at weblogic.rjvm.MsgAbbrevInputStream.getMethodDescriptor(MsgAbbrevInputStream.java:262)
    at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:148)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:195)
    at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:642)
    at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:589)
    at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerServer.java:164)
    at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:637)
    at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:454)
    at weblogic.socket.PosixSocketMuxer.deliverGoodNews(PosixSocketMuxer.java:456)
    at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:385)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Can someone tell me what's going on?
    Thanks

    Ed wrote:
    Hi,
    Can someone help?
    When there are many SQL exceptions thrown, the entire Pool connections on Weblogic
    6.1 sp2 become unusable, and I need to re-start Weblogic. And it gives me these
    errors:If you can show us some of the SQLExceptions, it would help. The problem below is
    not jdbc-related.
    Joe
    >
    >
    java.lang.ClassCastException: weblogic.rjvm.ClassTableEntry
    at weblogic.rjvm.MsgAbbrevInputStream.getMethodDescriptor(MsgAbbrevInputStream.java:262)
    at weblogic.rmi.internal.BasicServerRef.dispatch(BasicServerRef.java:148)
    at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:195)
    at weblogic.rjvm.RJVMImpl.dispatchRequest(RJVMImpl.java:642)
    at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:589)
    at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerServer.java:164)
    at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:637)
    at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java:454)
    at weblogic.socket.PosixSocketMuxer.deliverGoodNews(PosixSocketMuxer.java:456)
    at weblogic.socket.PosixSocketMuxer.processSockets(PosixSocketMuxer.java:385)
    at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    Can someone tell me what's going on?
    Thanks

  • How to change the default JRE when there are several version of JRE in Sys

    How to change the default JRE when there are several version of JRE in System?
    i have installed j2sdk1.5.0 then installed j2ee1.4,then installed Weblogic6.1 which use jdk1.3
    Now the JRE is jdk1.3\bin
    When run class that was compiled with jdk1.5,throw:
    java.lang.UnsupportedClassVersionError
    How can i change the jre to 1.5?

    There is a workaround to move from 1.5 version to the older 1.4 version. But this could be specific to the browser setting the JRE version.
    Excerpts from sun docs:
    However, a user can still run older versions. To do so, launch the Java Plug-in Control Panel for the older version, then (re)select the browser in the Browser tab.
    Example:
    Assume you are running on Microsoft Windows with Microsoft Internet Explorer, have first installed version 1.4.2, then version 5.0, and you want to run 1.4.2.
    Go to the j2re1.4.2\bin directory where JRE 1.4.2 was installed. On a Windows default installation, this would be here: C:\Program Files\Java\j2re1.4.2\bin
    Double-click the jpicpl32.exe file located there. It will launch the control panel for 1.4.2.
    Select the Browser tab. Microsoft Internet Explorer might still appear to be set (checked). However, when 5.0 was installed, the registration of the 1.4.2 JRE with Internet Explorer was overwritten by the 5.0 JRE.
    If Microsoft Internet Explorer is shown as checked, uncheck it and click Apply. You will see a confirmation dialog stating that browser settings have changed.
    Check Microsoft Internet Explorer and click Apply. You should see a confirmation dialog.
    Restart the browser. It should now use the 1.4.2 JRE for conventional APPLET tags.
    Details are here
    http://java.sun.com/j2se/1.5.0/docs/guide/deployment/deployment-guide/jcp.html
    My system (Windows XP) has the version 1.5_09 set as the default. However i just installed JRE 1.5_06 and would like to revert back to _06 as the default JRE..
    Will update if i find more information

  • I have a MacAir, mid 2011 model, and want to view video on my TV.  I see that I need a mini display port to Hdmi but there are many of these.  What exatly do I need and how does one view a movie downloaded to the MacAir on a TV screen?

    I have a MacAir, mid 2011 model, and want to view video on my TV.  I see that I need a mini display port to Hdmi but there are many of these.  What exatly do I need and how does one go about viewing a movie downloaded to the MacAir on a TV screen?

    Welcome to Apple Support Communities
    That's exactly what you need. A Mini DisplayPort to HDMI adapter and a HDMI cable. See > http://support.apple.com/kb/HT4241?viewlocale=en_US
    This is the only way to view a video on the TV. After connecting your MacBook Air to the TV, image on your TV should show immediately. Then, press Command and F1 keys to mirror your MacBook Air display, and open the video

  • How can I get rid of duplicate birthdays in icloud Calendar, especially when there are no Contacts in the iCloud? Case ID: 365381395

    How can I get rid of duplicate birthdays in icloud Calendar, especially when there are no Contacts in the iCloud? Case ID: 365381395

    Found the answer myself while helping to set up iPhone.  It is simple when you know how.  Before signing out of iCloud to sign in again and restore the link to Photo Stream I had opted to copy iCloud contacts to the Mac.  When I signed in again this created two iCloud views which can be seen in Contacts Preferences.  I just disabled one of them.  Not brave enough to attempt removal but I gues this would work too.

Maybe you are looking for

  • [new] gambas & openoffice-ca

    Please can you put this two new packets? - gambas -  a free development environment based on a Basic interpreter with object extensions, like Visual Basic - A OOo packet with the catalan language. Here you can find the binary made by softcatala.org T

  • Virtual cube with services - internal table I_TH_SFC

    I have a BCS virtual cube w/services. The function module of the virtual cube has an import parameter I_TH_SFC Which contains mappings of characteristics in query drilldown. Example: CHANM = 0BCS_CGPCTR, CHAALIAS=K____896 I want to simulated a drilld

  • Accounting Clerk not extended to SAP Connect (SOST) with fax

    Hi, Hope you can help me with my below issue. I am sending payment advice notes with program: RFFOEDI1 and RFFOUS_T through transaction F110...I am happy with the payment advice note we send with e-mail and it works fine because it does extend Accoun

  • Publishing WEBI report in Portal

    Hi I am trying to publish a WEBI report in our portal. I initially tried using the BusinessObjects Enterprise Integration Kit - IView Template, but have since been told via my OSS call that is the incorrect template to use, as that is for Crystal Rep

  • Gray Lines Over Image

    HELP! I have to get this DVD burned ASAP! I created a menu through after effects, but then exported a still to use as the main menu to prevent the whole animation menu to play each time you go to select a different video. The animated menu came out f