• Products
  • Download
  • Purchase
  • Support
  • Company
Actipro Software company logo
Twitter Follow Actipro RSS Subscribe (RSS Feed)

The Actipro Blog

Tag Cloud

  • blog
  • docking
  • editors
  • intelliprompt
  • micro charts
  • navigation
  • propertygrid
  • ribbon
  • shared library
  • silverlight
  • syntaxeditor
  • themes
  • views
  • web site
  • winforms
  • winrt
  • wpf

Latest Twitter News

May 14, 2012 at 2:50 PM
IntelliPrompt code snippet features have been added to our VS-like code editor control for #WPF and #Silverlight. http://t.co/1IchOJrr

May 10, 2012 at 9:40 PM
Our new Micro Charts control products for #WPF and #Silverlight are out now. Come build some dashboards with them! http://t.co/EEERvff0

May 7, 2012 at 6:47 AM
Today we look at bar charts, for our upcoming #WPF, #Silverlight, and #WinRT Micro Charts product. http://t.co/gxHuPS6B

May 4, 2012 at 6:25 AM
See a gallery of micro area charts in our upcoming release for #WPF, #Silverlight, and #WinRT. http://t.co/qDXGwW8B

May 3, 2012 at 6:32 AM
See a variety of line charts that are easy to make with our upcoming #WPF, #Silverlight, #WinRT Micro Charts product. http://t.co/mbkX6tJd

Twitter Follow us on Twitter

Month List

  • 2012
    • May (9)
    • April (6)
    • March (11)
    • February (11)
    • January (2)
  • 2011
    • December (2)
    • November (7)
    • October (2)
    • September (1)
    • August (5)
    • July (3)
    • June (6)
    • May (5)
    • April (8)
    • March (4)
    • February (5)
    • January (9)
  • 2010
    • December (9)
    • November (10)
    • October (4)
    • September (8)
    • August (12)
    • July (9)
    • June (7)
    • May (6)
    • April (7)
    • March (6)
    • February (6)
    • January (4)
  • 2009
    • December (2)
    • November (2)
    • October (12)
    • September (3)
    • August (11)
    • July (10)
    • June (6)
    • May (3)
    • April (7)
    • March (6)
    • February (8)
    • January (10)
  • 2008
    • December (10)
    • November (2)
    • October (3)
    • September (5)
    • August (5)
    • July (8)
    • June (4)
    • May (4)
    • April (10)
    • March (8)
    • February (1)
    • January (2)

Category List

  • RSS feed for ActiproActipro (321)
  • RSS feed for Blog SummaryBlog Summary (15)
  • RSS feed for GeneralGeneral (43)
  • RSS feed for In developmentIn development (164)
  • RSS feed for New featuresNew features (155)
  • RSS feed for New productNew product (38)
  • RSS feed for PromotionPromotion (2)
  • RSS feed for SilverlightSilverlight (90)
  • RSS feed for Tips and tricksTips and tricks (4)
  • RSS feed for Visual Studio 2008Visual Studio 2008 (2)
  • RSS feed for Windows FormsWindows Forms (22)
  • RSS feed for Windows VistaWindows Vista (10)
  • RSS feed for WinRTWinRT (9)
  • RSS feed for WPFWPF (257)
  • RSS feed for XAMLXAML (23)

About Us

Actipro Software is a leading provider of .NET user interface controls for the WPF, Silverlight, and WinForms frameworks, and is most well-known for their SyntaxEditor syntax-highlighting code editor control.

Please take some time to learn more about us and our product offerings.

SyntaxEditor for WPF - Incremental parsing for syntax highlighting

December 21, 2008 at 9:10 PM
by Bill Henning (Actipro)

One major area we’ve been working on for the past several weeks is how best to store data so that syntax highlighting can be fast yet not use much memory. 

In SyntaxEditor for WinForms, the Document had a Tokens collection that stored all parsed tokens in it.  The tokens then were used to provide syntax highlighting info to the views.  It was easy to pick up at any point for incremental parsing (when typing changes were made, etc.) since the existing tokens were readily available, and thus we’d be able to have lexical context information (which lexical scopes and states we are nested into at any given offset) very quickly.

While this works fine, there are some drawbacks:

  • On initial document load, the entire document must be lexically parsed… this means a brief pause when opening large documents.
  • The larger the document is, the more memory is used since tokens are stored for the entire document text.

Next Generation Updates

As mentioned in some previous posts, we’ve really been focusing on improving core features for our next generation text/parsing model.  Improvements fall into three areas:  feature set, performance improvements, and memory reduction.

We are really focused on enhancing the editing experience for large documents.  Our next gen design makes heavy use of virtualization techniques.  This means we have eliminated the need to parse the entire document on load, meaning a near-instant load time for large documents.  Additionally we no longer persist tokens in the document, meaning a huge memory reduction for large documents.

UPDATE: I should add that right now in the WPF control we can open a 10MB C# document about instantly and can start typing in it right away.  There is not noticeable slowdown in typing response speed or scrolling speed in a large document like this either, over that of a small document.

Since document tokens are no longer persisted like in SyntaxEditor for WinForms and are retrieved on-demand, determining the lexical context for a given offset was a trick to determine.  We’ve been at it for a while and finally have a good system for tracking and retrieving context info to allow incremental lexical parsing to resume near a specified offset after text updates.  This was a big hurdle to cross, so…

What’s Next

We’re going to clean up some of the code and add in a way to load dynamic language definitions that you created for SyntaxEditor for WinForms.  Then we’ll finally be ready to start a closed alpha test on what has been implemented so far!

Tags: wpf, syntaxeditor
Filed under: Actipro, In development, WPF
Submit to DotNetKicks...
Permalink | Comments (1)

Related posts

Integrating MGrammar DSL parsers with SyntaxEditor to implement syntax highlightingNow that the public beta of SyntaxEditor for WPF has been released, I’d like to show off a really ne...SyntaxEditor for WPF - Adding syntactic/semantic parsing supportAs we move forward on new features for SyntaxEditor for WPF, the next feature area we’ve been ...SyntaxEditor for WPF - Need input on highlighting style configurationSorry we haven’t made any new SyntaxEditor for WPF posts recently.  We’ve been hamm...

Comments

January 23, 2009 at 23:48  

Matthew Geyer

Count me in on the alpha test, sounds promising.

Matthew Geyer

Comments are closed
Copyright © 1999-2012 Actipro Software LLC. All rights reserved.
Home Actipro Software | Products | Download | Contact Us