|
I've now done the same using perfmon and don't see a significant overhead after taking the difference in process memory size.
Can you point to more information on this subject?
|
|
|
|
|
Windows Internals 6th Edition, Part 1 and 2.
Perfmon will only tell you exactly what you're telling it to, and only if the data is interpreted correctly.
|
|
|
|
|
In a sense there is little difference between dlls and exes from the .NET perspective. I sometimes make code that is designed to be consumed by something (so would normally be a DLL) an .exe to support stand-alone use etc.
My main point would be that they are conceptually different things. One is an application, the other is a reusable library. In a normal .NET deployment all your assemblies end up deployed in the same folder. Would you really want 20 .exes which don't do anything when you run them?
It is a useful semantic distinction.
Regards,
Rob Philpott.
|
|
|
|
|
Well, in .Net it is called an assembly, but for your question it has the same function as a DLL or static library in Win32.
An executable is usually a front end that the user executes and it can show a graphical user interface (GUI), a command line console interface or a web interface. An assembly is loaded into memory at run time and used by the executing application.
What you want to achieve with a library/assembly is to compile code that is used over and over again into reusable modules. Look at all the references you add to your exe, they all contain code other people have written and you can reuse.
Another way to reuse is to have compile the source code of the reusable classes into your exe, but that means that you need to have all source code available at all times.
It means that every compilation might give you a slightly different functionality if you share code and someone make some changes in a class. If you use a specific version of an assembly you are pretty sure that you get what you wanted (assuming versions are used)
This was a short explanation that could be much longer, and as an end note I boil it down to this:
1. No DLL's or assemblies are not obsolete.
2. Reuseability is the biggest advantage as I see it.
|
|
|
|
|
Hello,
I have a dropdownlist.
I and binding data to this dropdownlist in page load as below:
Module module = new Module();
lstModule = module.GetModules();
((DropDownList)fvReport.FindControl("ddlModuleID")).DataSource = lstModule;
((DropDownList)fvReport.FindControl("ddlModuleID")).DataTextField = "ModuleName";
((DropDownList)fvReport.FindControl("ddlModuleID")).DataValueField = "ModuleID";
((DropDownList)fvReport.FindControl("ddlModuleID")).DataBind();
((DropDownList)fvReport.FindControl("ddlModuleID")).Items.Insert(0, new ListItem() { Text = "Select", Value = "0" });
now I am into edit mode using formview. I have show the current selected value in this dropdown.
so I loading data and binding data source to it as below:
it is having ModuleID as field in the datasource.
<blockquote class="quote"><div class="op">Quote:</div>List<report> lstReport = new List<report>();
Report report = new Report();
report.ReportId = FormatNumValues.GetNullInt(hdnReportID.Value);
lstReport = report.GetReports();
fvReport.DataSource = lstReport;
fvReport.DataBind();</blockquote>
and on aspx page, doing as below:
<blockquote class="quote"><div class="op">Quote:</div> <asp:dropdownlist id="ddlModuleID" runat="server" width="80px" selectedvalue="<%# Eval("ModuleID") %>">
</blockquote>
When I execute the page, the dropdown list goes blank without any data.
Where am I going wrong?
|
|
|
|
|
Greetings.
I have a library written in C# 2.0 which will soon be re-released with minor documentation changes. The library was originally developed using VS 2005; I am now using VS 2013.
Given that programs which use the library could be written in any version of C#, and that I wish to make using the library as convenient as reasonably possible, should I re-release the compiled library only in C# 2.0 or a combination of versions?
I understand that C# 2.0, 3.0 and 3.5 use the same version of the CLR, whereas C# 4.x uses a newer version. I've read that mixing pre 4.0 libraries and 4.x applications might be an issue. Would the best option then be to release versions compiled with C# 2.0 and 4.0 ?
There is no plan to update the code in the library to use newer (> 2.0) C# language features.
Note that I have found related discussions on StackOverflow, but nothing which directly addresses the issue of releasing multiple versions of compiled libraries for different versions of .NET.
Thanks everyone in advance for their insight and suggestions!
Graham
|
|
|
|
|
If you do not change code, do not change .NET Framework version...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
Stay with .Net framework 2, but tell users of your library who wish to use more recent versions of the framework that they may need to add an entry in app.config:
<startup useLegacyV2RuntimeActivationPolicy="true" />
|
|
|
|
|
Graham Wilson wrote: Given that programs which use the library could be written in any version of C#,
But will they? The answer to that should drive both your decision.
And naturally you should also make an attempt to test it with newer versions.
|
|
|
|
|
Hello everyone why is it that I can't run/open my Microsoft Visual Studio.
When I open the Task Manager, at first devenv.exe will appear in process but it closes/ended in a moment.
I tried using it in Safe Mode and the application is working.
Please Help.
Thanks
that does't mean that I can't do it
modified 1-Sep-14 13:02pm.
|
|
|
|
|
You need to a) use the correct forum (this is for .NET questions), and b) provide more details about what is happening.
|
|
|
|
|
Sorry, should be in Visual Studio Forum
really don't know what happened, I can use this application this past days
I try searching it in google but can't find a solution
that does't mean that I can't do it
|
|
|
|
|
As is always the case with things like this, it's worth checking the event log for any clues.
Regards,
Rob Philpott.
|
|
|
|
|
Thanks for your answer. This is the Event Log when I open the application
The application (Visual Studio 2005, from vendor Microsoft) has the following problem: Visual Studio 2005 has a known compatibility issue with this version of Windows.
Fault bucket 38848502, type 17
Event Name: APPCRASH
Response: Not available
Don't know why this application showing error in compatibility. I can run this on the other day.
that does't mean that I can't do it
|
|
|
|
|
|
friends i have created a dll in vb.net for my editor but this dll can be used by any one how to protect others from using my dll.
Thanks in Advance
|
|
|
|
|
|
I'm struggling to understand the cause of the poor performances of the .NET virtual machine when compared to Java (JVM), DartVM or even JavaScript (V8) in this Raytracer demo.
In brief: I've written a ray tracer program in various languages: C#, Dart, TypeScript and Java, that I compile both for native virtual machines (CLR, JVM, DartVM) and browsers (thanks to JavaScript compilation).
Now when comparing them all, C# running natively is astonishingly slow. What Java calculates in 5 seconds, .NET takes 40 seconds, that is 8 times slower! 3x slower than Dart or JavaScript.
Not only, what is really embarrassing is that C# compiled to JavaScript and running in Chrome is 2.5x faster than native C#! How is it that possible?
I tried all possible compile switches but nothing seem to be able to cut the execution times.
Do you have some possible explanation? Is .NET really that slow?
If you like, please have a look at the Github repo and run the tests independently. There must be a flaw somewhere that I can't see. Please help me find it out.
|
|
|
|
|
Without analyzing your code (I don't have the time right now) it's impossible to say.
One possible explanation is that your implementation is generic and does not play to the strengths of C# and the .NET Framework. It may be that your implementation is the one that is inefficient. One way to test this would be to compare your ray tracing implementation against the implementations written by others in C#.
|
|
|
|
|
I avoided to use optimizations, the basic idea was to keep it generic so to make comparison between languages more meaningful. Also, I can't think of any specific optimization that applies only to C#--the code is rather plain-vanilla, classes, lists and floating point math.
|
|
|
|
|
There is really no way to make a "meaningful" comparison of speed between any language runtimes.
You will always run into situations and implementations that will favor one runtime over another. Make some changes to the code and the favor can easily fall the other way.
Really, what do you do with that data? I know of no one who picks C# or JavaScript for a project because of some "benchmark". You write code that plays the strengths of what you're using.
|
|
|
|
|
Antonino Porcino wrote: Is .NET really that slow? No, it's not.
You might want to take the environment into consideration; V8 has optimized graphics running on the video-card. If you want to do the same from .NET, you'd have to use CUDA, DirectX or XNA.
You're also comparing something that's compiled to IL to a scripted language (JS)
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: You might want to take the environment into consideration; V8 has optimized graphics running on the video-card.
the use of graphic is minimal and doesn't justify the difference in performance. It's a 640x480 pixel, its drawing time is trascurable.
Eddy Vluggen wrote: You're also comparing something that's compiled to IL to a scripted language (JS)
exactly, what did you expect to run faster?
|
|
|
|
|
Antonino Porcino wrote: the use of graphic is minimal Enough to make quite a difference.
Antonino Porcino wrote: exactly, what did you expect to run faster? The JavaScript of course, but only in the V8 engine. It is running in a limited and optimized environment, and should be faster due to the optimizations[^]. You also won't be loading much native assemblies there, as they are already in the environment. Memory will already be reserved by the host.
As for the interpreter - it's a wrong assumption. The IL is run by the Virtual Machine (an interpreter). JavaScript in V8 is translated to machine code.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Eddy Vluggen wrote: Enough to make quite a difference.
By commenting out the RenderPixel() call like this
Color c = new Color(255,23,75,193);
execution time is only 2 seconds, meaning that most of the time (38 secs) is spent in calculating, not in graphics. So graphic is only 5%.
|
|
|
|