Sign in
Feng Yuan (袁峰)
CLR, Performance, Debugging, Parallel Computing, WPF, XPS, GDI, GDI+, Printing (www.fengyuan.com)
Options
Blog Home
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search
Tags
C#
C++
CLR
CLRProfiler
GIS
IE9
Pages
Parallel Computing
Performance
Printing
SVG
Visio
Win32
XPS
XPS, Printing
Archive
Archives
September 2012
(1)
August 2012
(4)
July 2012
(1)
June 2011
(1)
May 2011
(1)
April 2011
(2)
March 2011
(5)
June 2009
(2)
January 2008
(2)
May 2007
(3)
April 2007
(2)
March 2007
(6)
February 2007
(1)
August 2006
(3)
May 2006
(3)
April 2006
(2)
March 2006
(3)
February 2006
(1)
January 2006
(5)
October 2005
(1)
September 2005
(12)
June 2004
(1)
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Feng Yuan (袁峰)
XPS Again
Posted
8 months ago
by
Feng Yuan
0
Comments
I needed to generate images for an HTML document I'm generating, for which I use create a DrawingVisual and render it to a RenderTargetBitmap before saving to a PNG file. Now I would like to save the same visual to an XPS document. The benefit of having...
Feng Yuan (袁峰)
Performance Tips: Faster than StringBuilder?
Posted
9 months ago
by
Feng Yuan
7
Comments
The web has tons of articles about how StringBuilder is much faster than string concatenation using '+' operator or String.Concat functions when there are enough strings to ber merged. Here is an MSDN article on this topic: http://support.microsoft.com...
Feng Yuan (袁峰)
Performance Tips: System.Text.StringBuilder and String.Concat
Posted
9 months ago
by
Feng Yuan
2
Comments
Much has been written about the benefits of using StringBuilder over string concatenation. So much so that there seems to be overuse of StringBuilder class, causing performance issues again. If you're using StringBuilder and string concatenation a...
Feng Yuan (袁峰)
Performance Tips: String.Split
Posted
9 months ago
by
Feng Yuan
0
Comments
String.Split methods are provided in .Net as a convenient way of dividing string into parts. Here are two basic forms of String.Split methods: public string [] Split( char [] separator, int count, StringSplitOptions options); public string [] Split...
Feng Yuan (袁峰)
TextWriter.WriteLine(string, object[]) in less memory, less time
Posted
9 months ago
by
Feng Yuan
1
Comments
I found myself increasingly generating reports in .csv format, and then use Excel to analyze the reports. With large amount of data written to the .csv file, file generation time becomes more and more noticable. So I took some time to check what is taking...
Feng Yuan (袁峰)
Problem: Better way to remove characters that aren't 32 to 175
Posted
10 months ago
by
Feng Yuan
0
Comments
There is a question on StackOverflow.com about better ways to remove characters in a string that are outside the range of 32 to 175. Quite a few fancy solutions are provided: Regex . Replace ( myString , @"[^\x20-\xaf]+" , "" ); new string...
Feng Yuan (袁峰)
Drawing bearing and distance property line using C#/SVG/IE9/Visio (V2)
Posted
over 2 years ago
by
Feng Yuan
0
Comments
Here is expanded version of my little C# program which converts property description in bearing and distance to SVG, which can then be viewed by IE9 or imported into Microsoft Visio: Program.cs (attached) New features: endpath command to end...
Feng Yuan (袁峰)
Drawing bearing and distance property line using C#/SVG/IE9.
Posted
over 2 years ago
by
Feng Yuan
0
Comments
If you read an official property legal desciption, property line are often described using bearing and distance. Here is an example: BEGINGING AT THE NORTHWEST CORNER OF SAID SOUTHWEST QUARTER OF THE SOUTHWEST QUARTER OF SECTION 9; THENCE SOUTH 89°35...
Feng Yuan (袁峰)
EWD637: Three Golden Rules for Successful Scientific Research
Posted
over 2 years ago
by
Feng Yuan
0
Comments
Here is something I read in graduate school and still thinks about from time to time: Edsger W. Dijkstra's Three Golden Rules for Successful Scientific Research: Raise your quality standards as high as you can live with, avoid wasting...
Feng Yuan (袁峰)
Optimization Note (C++) 1: push, pop, call _chkstk
Posted
over 2 years ago
by
Feng Yuan
0
Comments
I was looking at assembly code trying to improve an important performance scenario when I found a strange call to _chkstk 011E100E push 10h 011E1010 pop eax 011E1011 call _chkstk (011E1810h) 011E1016 mov ecx,esp My understanding is that...
Feng Yuan (袁峰)
Improving CLRProfiler 4: Reducing SampleObject memory consumption by 58%
Posted
over 2 years ago
by
Feng Yuan
2
Comments
In the previous three posts, we managed to double the speed of file loading time of CLRProfiler through profile-guided optimization in three simple steps. Now let's take a look at reducing CLRProfiler's memory consumption, making it more useful to real...
Feng Yuan (袁峰)
Improving CLRProfiler 3: Double the speed of profile loading
Posted
over 2 years ago
by
Feng Yuan
1
Comments
In the first step of profile-guided optimization, we reduced tatal CPU sample of ReadNewLog.ReadFile from 6,223 samples to 5,803 samples; the second step reduced it further to 3,982. Would it be nice if we can reduce it to below 3,111 samples, essentially...
Feng Yuan (袁峰)
Improving CLRProfiler 2: 19.7% in TryGetValue
Posted
over 2 years ago
by
Feng Yuan
2
Comments
Playing with Visual Studio 2010 profiler data Function Code View finds another easy target for improvement: 19.7% in calling TryGetValue on a Dictionary object: This piece of code is called in 'c' command process for logged method call information...
Feng Yuan (袁峰)
Improving CLRProfiler 1: 8.4% Progress Bar Update
Posted
over 2 years ago
by
Feng Yuan
0
Comments
Being a CLR performance dev, it seems that CLR profiler will be a very useful. So now I'm trying to understand it inside out, and may be even make some improvement to it. Here are the steps I'm taking: Download CLR profiler 4.0 source code. ...
Feng Yuan (袁峰)
New Job: CLR performance team
Posted
over 2 years ago
by
Feng Yuan
3
Comments
I switched job to CLR performance team last August. Now I'm working on something which has huge customer impact, needs tons of technical depth, and fits my long time passion as an old practicing programmer (I still have 30-year source code listing...
Feng Yuan (袁峰)
(VS2010 Beta1) Native Parallel Programming: ConcRT example -- Debugging TwentyFour
Posted
over 4 years ago
by
Feng Yuan
2
Comments
In a previous posting, we presented a simple C++ parallel program TwentyFour, which is based on the new native parallel programming API (ConcRT) introduced in Visual Studio 2010. In this posting, we're going to discuss on how understand the running of...
Feng Yuan (袁峰)
(VS2010 Beta1) Native Parallel Programming: ConcRT example -- TwentyFour
Posted
over 4 years ago
by
Feng Yuan
0
Comments
WIth Microsoft Visual Studio 2010, Microsoft is releasing a new set of API for native parallel programming named ConRT (concurrent runtime). The purpose of this blog article is to illustrate the basics of ConcRT programming in VS 2010. We will be using...
Feng Yuan (袁峰)
STS: A palindromic word I will remember
Posted
over 5 years ago
by
Feng Yuan
1
Comments
Continuing searching palindromic sqaure numbers finds a new record number, a 55 digit parlindromic square: 1373512530649258635292477609 ^ 2 = 1886536671850530641991373196913731991460350581766356881 Quite a few records for other palindromic sequences...
Feng Yuan (袁峰)
A 53-digit Palindromic Square Number
Posted
over 5 years ago
by
Feng Yuan
1
Comments
Six years ago I wrote a program to search for palindromic square numbers and other palindromic numbers and found some new palindromic numbers. But with increasing length, the search became longer and longer so I finally gave it up. Recently I got a...
Feng Yuan (袁峰)
XpsStat: A program for gathering statistics information of XPS documents
Posted
over 6 years ago
by
Feng Yuan
5
Comments
In the Winhec presentation on XPS document performance optimization, a simple program XpsStat is introduced to analyze XPS documents. Given an XPS document, XpsStat generates four or five tables in HTML format: Container Summary Table: information...
Feng Yuan (袁峰)
XPS Performance
Posted
over 6 years ago
by
Feng Yuan
1
Comments
There will be two XPS related sessions at Winhec 2007 tomorrow, focusing on Performance Optimization for XPS Document. The techincal presentation (CLN-T371 ) will be at 8:30am to 9:30am in Room 502AB. Shortly after that (9:45 to 10:45), there will...
Feng Yuan (袁峰)
XPS at Winhec 2007
Posted
over 6 years ago
by
Feng Yuan
1
Comments
Today (May 15, 2007) is the first day of Winhec 2007. If you're application developers, printer/scanner/multi-functional device vendors, you may be interested in the following XPS related sessions. CLN-T370 XPSDrv: Best Practice using Print Verifier...
Feng Yuan (袁峰)
A Simple XPS Decoder in C++
Posted
over 6 years ago
by
Feng Yuan
10
Comments
If you write programs in C#, Windows Presentation Foundation in .Net 3.0 provides quite nice API to write, generate and manipulate XPS documents. You can get the same feature if you work with managed C++ in .Net 3.0. Even if you work with .Net 2.0, you...
Feng Yuan (袁峰)
Another Ph.D for Bill Gates
Posted
over 6 years ago
by
Feng Yuan
2
Comments
On April 19th, Bill Gates has been awarded a honorary Ph.D degree by Tsinghua University ( http://en.wikipedia.org/wiki/Tsinghua_University) , the best engineering school in China.
Feng Yuan (袁峰)
Something useful from 'junk' mails
Posted
over 6 years ago
by
Feng Yuan
2
Comments
With a high school junior in the house, we're receiving tons of 'junk' mails from colleges these days. They usually pile up on the desk until we have time to read and discard them. Today, my wife found something useful, or rather something we have...
Page 1 of 3 (61 items)
1
2
3