|
I added half a million (424,379) and it took roughly about 5 minutes....
How long did yours take?
/\ |_ E X E GG
|
|
|
|
|
The 15,000 items took about .1 seconds in .NET. My original test was taking .35 seconds in MFC/C++. After some work, the tests on a different, slower, system took .2 seconds in .NET and .4 seconds in MFC.
Do note that on additions as large as yours, paging starts affecting performance.
When all else fails, there's always delusion.
- Conan O'Brien
|
|
|
|
|
for(int i=0; i<data.Length; i++)
{
logForm.listBoxLog.Items.Add(DateTime.Now.ToString("hh:mm:ss:ff")+": ["+data[i].ToString()+"]");
}
and i'm guessing that the "DateTime.Now" is slowing it down too, correct?
/\ |_ E X E GG
|
|
|
|
|
Probably not as much as you might think. The DateTime functionality will be paged in and in such a tight loop may be entirely in the CPU secondary cache. In smaller amounts, the memory allocator in .NET is more efficient than that in C++, but I've already accounted for that by testing with preallocated objects.
Of course adding a hundred thousand items to a list box is generally a bad idea, thus the question as to whether the .NET box is a virtual box.
When all else fails, there's always delusion.
- Conan O'Brien
|
|
|
|
|
|
Use an obfuscator. VS.Net 2003 comes with one.
|
|
|
|
|
|
Yeah, what he said
|
|
|
|
|
Xarx wrote:
Anyway to stop programs from being decompiled?
The most common way is to use an obfuscator. Obfuscators change the names of the members in an app so that the person decompiling it can;t as easily make sense of it (which is easier to figure out the meaning of: "CustomerListView.AddItem(...)", or "Member25.Member33(...)" ?). There's one that comes with VS.NET, but if you're doing serious work, you'll need a more advanced version.
Another way is to compile the executable into native code. There's an app, .NET Protector[^], that does this for you.
Xarx wrote:
i was able to decompile most of WebMatrix
Hmm... could you send me the code? Just kidding, but I would like to know how they show ASP.NET controls in the HTML designer.
|
|
|
|
|
Is there something like .NET Protector that is free by any chance?
Thanks!
|
|
|
|
|
I wish there was...
|
|
|
|
|
jdunlap wrote:
Another way is to compile the executable into native code. There's an app, .NET Protector[^], that does this for you.
Am I missing something or does this look like a glorified ngen?
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|
|
David Stone wrote:
Am I missing something or does this look like a glorified ngen?
Well, ngen creates native images, but those images unfortunately cannot be transferred to another computer.
|
|
|
|
|
jdunlap wrote:
but those images unfortunately cannot be transferred to another computer.
Are you sure about that? I was under the impression that they could...
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|
|
The problem with ngen is that it still relies on the non-ngened copy. Next time you ngen an executable, try removing the original and then running it. It won't work.
if (!Signature.Exists())
{
// TO DO: Add Signature here
}
|
|
|
|
|
Ah, thank you...I didn't realize that...turns out you're right.
When I can talk about 64 bit processors and attract girls with my computer not my car, I'll come out of the closet. Until that time...I'm like "What's the ENTER key?"
-Hockey on being a geek
|
|
|
|
|
Hi,
Is there a diagram work which is done in .NET except northwoods godiagram and netron???
Thanx...
|
|
|
|
|
There is also:
- AddFlow for .NET from Lassalle Technologies.An evaluation version can be downloaded at: http://www.lassalle.com/download.htm#.NET
- Metadraw from Bennet-Tec
- ERM3 from Crainiate
2 remarks:
- AddFlow is the best
- I am the author of AddFlow
|
|
|
|
|
Hello!
First of all:
Please correct me if I'm wrong, the following represents my opinion, I'm not perfect in OO and c# programming, so I want good arguments against or for it, to make a clear decision at the end (and of course learn something from that!)
I'm to contribute to a "not-so-small" c# project and the problem is that I can't come on to one of the conventions:
Forms are designed as normal with clicking, BUT (for the argument of separating design from functionality which I can't support in this case), there exists an additional class (and file) for each form, an adapter.
For example:
------------
The form frmMain is designed and in the constructor is the following statement:
_frmAdapter = new frmMainAdapter( this );
and in the adapters constructor:
frmMainAdapter( frmMain frm )
{
_frm = frm;
}
So far ok, but now are ALL used members (for example text boxes etc.) are declared as internal.
example:
previously:
-----------
private System.Windows.Forms.Button btnOK;
becomes:
--------
internal System.Windows.Forms.Button btnOK;
to be accessible from within the adapter.
If I want to, for example, add an event handler, I have to do the following in the adapter:
_frm.btnOK.Click += new EventHandler(btnOK_Click);
//That btnOK_Click is a method within the adapter.
Now my opinion:
---------------
I find that design highly disturbing and wrong, because the changes to "internal" violates a lot of the idea of accession levels in classes (in this case) and since only the adapter needs access from the outside, the whole thing becomes some kind of "psychological friend class" (hope you understand what I mean).
Now I cant check what functions will be executed and which events are associated with the controls in the form, because everything is moved into the adapter. So some features of the IDE are also eliminated with that.
Sure, one can argue for separating design from functionality, but in this case (can anyone strengthen this argument??) - C# forms - design is a part of functionality (at least I think so...) and it makes no sense to make such a separation.
Those are my two arguments against that design, can anyone proof that? or make arguments for such a design? add some more arguments for or against? Is it generally a bad design or only in this case? or only in this case not?
I'm eagerly waiting for your answers!!!
Thank You
JosefS
|
|
|
|
|
In your example, it looks to me like you get all the inconvieniences of separation with none of the benefit. In particular, there is still heavy dependencies between the two classes and neither can live without the other. So what's the point?
The best reason to separate is to make both classes simpler: a click event may make some other controls invisible and set a property in the controller class. The controller changes state and fires a bind method on the form. Now, you can easily test the controller and the form is simpler too.
Philip Nelson
|
|
|
|
|
Hi!
I'm developing an application that uses remoting. I used to use the .config file and RemotingConfiguration.Configure() to configure my server, but now I'm asked to save everithing on the registry. I've been able to migrate everything but the custom error attribute in the .config file. I have written my own Exception (which inherits from System.Exception). It is serializable and works great when I add the <customerror mode="Off"> in the .config file, but when I register everything programatically I get an exception in the client asking me to add that tag. Is there any way to do that by code?
Thanks in advance,
Matias
PS: if needed I can post the server code.
|
|
|
|
|
I'm having the same problem. Did you ever get an answer to this?
C LaMorticella
Client Instant Access
|
|
|
|
|
I created a class that inherits from the RichTextBox control. I need to do some custom drawing on the RichTextBox, so I override the paint event and do the custom drawing:
protected override void OnPaint(PaintEventArgs e)
{
// draw normally
base.OnPaint (e);
// add our custom border
ControlPaint.DrawBorder(e.Graphics, e.ClipRectangle, Color.Black, ButtonBorderStyle.Solid);
}
Simple enough, right? Well, when I run the app, every time I enter text into the control, the custom drawing I did gets cleared. Why is that? Is there a way around this?
The graveyards are filled with indispensible men.
|
|
|
|
|
Instead of using e.ClipRectangle, create a new rectangle with the size and position of e.ClipRectangle...
Free your mind...
|
|
|
|
|
I think I've found a bug in the XML documentation's integration with Intellisense. Here's the situation:
I have a class library that has a class with an overloaded indexer.
<br />
namespace myClassLibrary<br />
{<br />
class someClass<br />
{<br />
...<br />
public object this[int index]<br />
{<br />
...<br />
}<br />
<br />
public object this[string test]<br />
{<br />
...<br />
}<br />
}<br />
}<br />
All seems well and good, an overloaded indexer is no problem. If I begin typing the indexer in Visual Studio 2k3, Intellisense will rightly pop up and begin describing it. However, this is a class library and is used in other projects. If I begin typing the indexer for this class in a seperate project that uses this library, Intellisense shows no documentation for either indexer. Has anyone else seen this?
The graveyards are filled with indispensible men.
|
|
|
|