-
Content Count
3715 -
Joined
-
Last visited
-
Days Won
186
Posts posted by David Heffernan
-
-
Encrypting the map file, and then decrypting on runtime doesn't add much security. Your map file would be readily reversible by any moderately skilled hacker. If you want to keep the map file private, don't add it to your exe and decode the stack trace addresses into method names when the bug report is sent to you.
-
14 hours ago, Yaron said:any ideas?
Answer can be found in the documentation of Sleep. Sleep can only wait for multiples of system ticks. And your system appears to tick at a frequency of 15ms. Which is typical, that being the default tick frequency. There are many many discussions of this online. Here's one: https://stackoverflow.com/questions/3744032/why-are-net-timers-limited-to-15-ms-resolution
-
2
-
-
Yes, I understand the behaviour, but I just don't know the use case. I guess it just be some exception handling model that I've never used. Like Mathias I tend to raise a new exception, or re-raise. But obviously breaking language feature is not desirable.
-
1
-
-
I guess that like Mathias I don't understand the use case for the code which madExcept is making fail.
-
And what about Mathias' response in that thread?
-
madExcept does support nested exceptions.
-
3 hours ago, david_navigator said:Is it only me that thinks it's funny that it's faster to run Windows via an emulator on a non-native platform, than it is to run Windows directly on Intel ?
That does sound funny. Is it true though?
-
37 minutes ago, Hafedh TRIMECHE said:The leak is generated by a bad usage of SSL routine.
Are you saying that it was in the end nothing to do with your SetLength calls and was just a defect somewhere else in your code that corrupted the heap?
-
1
-
-
5 minutes ago, Hafedh TRIMECHE said:I guess that is a Reallocation problem!
The code changed to:
SetLength(Result,0); SetLength(Result,OutLen);
solved the problem. But it's at a higher risk: Result content would be lost when setting length to 0.That doesn't change anything. That is just wasteful. We know that dynamic arrays work correctly. If you really want to resolve the problem you need to clearly identify it first.
-
The code that we can see can't leak. There is likely a bug in some other code, probably your code. If you show a minimal repro we'll find it easily.
-
1
-
-
1 hour ago, Mike Torrettinni said:Yes, I think I will go for it. Current 32GB was enough, but got close to the max often. So, 64GB should be enough for next 5 years or so.
Using all your memory doesn't necessarily mean that your computer would be slower with less. It usually just means that your computer is making the disk cache as large as possible.
-
If running Delphi is the biggest concern that you have, as you stated above, then it looks like you are significantly over-speccing this machine.
-
I don't see l any good reason why the IDE stability would have anything to do with hardware. It's just bug ridden.
Those AMD processors are pretty tasty. Gamers love them. But they are way over powered for Delphi. Most important thing you can do for Delphi IDE perf is have a good SSD.
-
1
-
-
8 minutes ago, Anders Melander said:While I completely agree with David's considerations it should be noted that the startup cost of an in-process COM server is considerably smaller than that of of an out-of-process COM server. For an in-process server it's basically just the cost of setting up the COM apartment. For an out-of-process server there's also the cost of launching the process.
I meant the startup cost for the developer to learn how to create and maintain and deploy com servers.
-
Whether you opt for pinvoke or a COM server depends very much on what the interface surface area looks like. I don't think anybody can give you a valid recommendation without knowledge of that.
Broadly speaking, for more larger and more complex interfaces, then a COM server may be preferable. For simpler interfaces, then p/invoke may be preferable. It is more effort to setup a COM server (especially if you have to learn COM), but having done so the coding on both sides will likely be simpler. For larger and more complex interfaces the startup cost of a COM server will yield time savings to offset that. For an interface that can be represented by a small number of functions, then you will never recover that startup cost, hence why p/invoke would win.
To my mind at least those are the main factors to consider in your decision.
-
1
-
-
What other tools use pdb? I think pdb files can be used to get stack traces in Process Explorer and Process Hacker 2. Obviously there is Visual Studio and there must be many others. I wonder if anybody has tried using the pdb files generated by map2pdb with other tools such as these.
-
-
The fact that the term "scalable memory manager" exists shows that heap allocation is a particular issue for multi-threaded programs.
3 hours ago, Fr0sT.Brutal said:really heavy multithread tasks will try avoiding allocs at all
That's the same point that I have been making.
-
Selecting text in an edit control is for sure a use case where this is needed.
-
1
-
-
Amazing work. Well done!! Thank you.
Although it can't be compiled in older versions, presumably it works with programs built with older versions of Delphi? And do you have plans to support 64 bit?
-
3 hours ago, vfbb said:All manipulations of strings received by user input should consider each element and not each individual character. This is basically why delphi TEdit does not work properly with these kind of emojis (just try adding one and pressing backspace that you will see part of problem). In short, when you don't consider this, you risk breaking a string into a position in the middle of a Grapheme, creating a malformed string.
As I said, this iteration is essential, Embarcadero should implement this natively to work cross-platform just like C # did.
The best thing to do at this point is to port the C # code.
I don't think this is true. TEdit is the Win32 EDIT control. What are you doing with strings that need to know what you are asking about? What's your usage scenario?
-
1
-
-
Why would you need to know this, unless you are rendering the text
-
36 minutes ago, Fr0sT.Brutal said:FastMM already reserves some space after a string/array so manual reservations are unneeded where it is used. F.ex., the following test case
procedure TForm1.Button2Click(Sender: TObject); var arr: array of byte; i: Integer; begin for i := 0 to 30 do SetLength(arr, length(arr)+1); end;
only caused four reallocations
Isn't that going to claim a global lock 31 times?
-
- Put the labels in an array, and then access them by index, or
- Use a single label, and include linebreaks in the caption, or
- Create the labels dynamically, or
- Probably some other solutions that I have not thought of.
-
1
Is a "bare-minimum" EurekaLog possible?
in Delphi Third-Party
Posted
Yes, this is precisely what I currently do