Re: for jamal:edsharp speed

  • From: "Littlefield, Tyler" <tyler@xxxxxxxxxxxxx>
  • To: programmingblind@xxxxxxxxxxxxx
  • Date: Tue, 02 Nov 2010 11:24:00 -0600

Hello jamal, The decrease is just in your SetDefaultConfigurationValues. What happens is this (I think) When I open up a file from WINScp, edsharp is called with the process and hands the new file off to the old edsharp. So the startup delay came in there because it did the whole SetDefaultConfigurationValues before it realized anything was up. Maybe the IPC (if it does it at all) could be moved up in execution. Either way, something started a separate instance before handing the new file off. The only change I made was to comment that out, which was a huge increase. I'm not really sure what your doing there, but perhaps there's a cleaner way of doing it as you seem to write back all the values you read in. The program's speed itself isn't a huge problem, it was just at load time that there were issues.


On 11/2/2010 11:18 AM, Jamal Mazrui wrote:
If you modified the source code of the latest distribution, please send me an attachment with the revised EdSharp.cs, including some way of showing me what changes you made (e.g., via comments with your initials as a prefix). I have been aware of sub optimal startup time, though not figured out the cause, myself. If code changes can be made that improve performance without loss of functionality, I will almost certainly implement such changes. If there is loss of functionality, I will have to evaluate how much is lost, and whether there is another way to achieve the same thing.

I think you mentioned slow startup when oping a file. I thought you were referring to every time you pressed Control+O for Open File or Alt+R for Recent Files, and was baffled by that, as I have not noticed significant performance problems there, nor had they been reported by others. I am aware that the initial startup time of the executable is noticeable, though once EdSharp is loaded, subsequent oping of files in Windows Explorer or whatever file manager should not be bad, since the same executable in memory is used (after .NET determines that an attempt was made to load the same program that is defined as a single-instance app).

I have not had a chance to test on 64-bit Windows myself, so if that is the platform, then I suspect something related to 64-bit compatibility, though I do not have a solution. Another thought is whether the .NET Framework 4.0 is causing slower performance than the 2.0 version. Has there been a slow down from prior versions of EdSharp? Now EdSharp uses the latest .NET by default, but this can be changed by editing the file called EdSharp.exe.config, located in the EdSharp program folder. The latest .NET is supposed to improve performance, as well as make many more classes available, but if it is slowing performance, I want to know about it.

I doubt the use of Windows COM servers is causing the performance problems in question. They tend to be used for unusual or advanced features, rather than normal editing and navigation. .NET applications do run slower than native Win32 apps because of the managed code with security checks and other meta data that is processed. Running Visual Studio illustrates the delay when part of a .NET app is JIT-compiled for the first time. It is one of the trade-offs of using managed code. For me, the trade off has been worth it because I could not have developed EdSharp nearly as rapidly without the .NET classes that make things much easier than native Win32.

Jamal





On 11/2/2010 12:20 PM, Littlefield, Tyler wrote:
Hello,
I don't have your e-mail address on hand, so I figured I'd just send
this here. I had someone with some sight look through the profiler
results, and it seems you spend about 40something percent of the time
loading in the SetDefaultConfiguration values. I made it create me the
configuration file, then commented that out and edsharp loads perfectly.
Any chance in the code being restructured at some point to look cleaner?
I'd like to help out, but I have no idea where I'd even start;
transitioning from using visual basic classes in c# would be a great
start, there's a lot that c# does that you call com objects for. I'd
also recommend splitting things up some, but again I have no idea where
to even begin. I also commentd out that huge block of languages in both
the old and new functions where they're set, as I wasn't able to see
what they were used for.
Thanks,


__________
View the list's information and change your settings at
//www.freelists.org/list/programmingblind

__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: