

Rollo62
Members-
Content Count
1881 -
Joined
-
Last visited
-
Days Won
23
Rollo62 last won the day on September 3 2024
Rollo62 had the most liked content!
Community Reputation
560 ExcellentTechnical Information
-
Delphi-Version
Delphi 12 Athens
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Interesting read: How to Query File Attributes 50x faster on Windows
Rollo62 posted a topic in Windows API
Hi there, via WholeTomato https://www.wholetomato.com/blog/2024/11/14/how-to-query-file-attributes-50x-faster-on-windows/?utm_source=Eloqua&utm_medium=email&utm_content=Article-250314-WT-50xfaster -
Would you please explain a little, how the 64Bit IDE is integrated into the existing system? I understood that both have two separate registry entries, which would make sense, but what about the installation files & binaries? a.) are all these files land in completely separate, external installation folders, outside the normal "Embarcadero/Studio/23.0/bin" folder with all different libraries and *.dll, or b.) is this just another internal folder or *.exe aside the normal "Embarcadero/Studio/23.0/" or "Embarcadero/Studio/23.0/bin" folder a.) would mean that more or less double the size or installation, all files 32-/64-Bit, even if they maybe same. b.) would mean that most libraries, dlls, etc. are maybe shared and the new 64BitIDE is more or less a new *.exe, which is using that. Would be great to know how much the degree of re-use for the new 64BitIDE files there is, Is this doubling the size, or only a fraction? I cannot find any information from Embarcadero to this.
-
Thats what I think too, but have you tested it already for cross-platform, without issues? Better I wait a day or two.
-
Oh my, I'm still on Delphi 12.11 and wanted to upgrade to 12.2. My 12.11 was (is) very stable, so I hesitated with the move. Now I have to jump to 12.3 immediately and skip 12.2, will Delphi 12.3 be as stable as 12.2, I doubt it. Shall I update to 12.2 or better directly to 12.3 then? I hope to get some early responses here on stability for Android, iOS, before I decide this.
-
The status of "System.SysUtils.Now" timer resolution & accuracy
Rollo62 replied to Rollo62's topic in RTL and Delphi Object Pascal
Thanks, that very helpful. It is what I expected, of course the all should be derived from a deeper hardware clock, with the same resolution. But this is just my assumption, Raymonds article leads to this conclusion too: - GetTickCount64 is based it's same name Windows kernel function, and - Now() is based on Windows GetLocalTime() function. which all belongs to that same group and leads to the same timer resolution of 10 to 55ms ( I believe that is more realistic, but I will stay with 15ms the average ). My quick measurements here show tolerances of approx. 1S = 7-8ms, where within 3S = 21-24 ms I should stay within 95% for all time resolution outliers. But its just a rough test on a virtual machine and no scientific result, but it shows that the resolution shall be far below 1 Sec. With a upper/lower limit of 3S I could catch only very few outliers, and within 4S it showed no more outliers at all. Because of that I would safely assume that a tolerance of 4S = 28-32ms is a realistic worst-case scenario for my virtual machine, which matches to Raymonds note. All in all, that is what I expected and good to know that there is at least an official statement from Microsoft too. It may be possible that Windows system timer functions gets massively blocked by various extra loads, which may then have a good reason. I don't expect any realtime accuracy from those kind of timers in that group anyway. Perhaps the 1 Sec. Note from Embarcadero ist just stupid a "Warning", that the Now() Function is not intended for any precise measurements, although it do support ms resolution. Yes, time is relative ... good that you remind me that. Thats why I can perfectly live with 15ms timers too, in about 99.9% of uncritical cases Regarding TStopwatch.Timestamp(), this is based on the following system functions, whereas I want to avoid the macOS "mach_absolute_time()" function for obvious reasons https://en.delphipraxis.net/topic/13126-apple-gettimertick64-mach_absolute_time-how-to-handle-the-nsprivacyaccessedapitype-privacy/?tab=comments#comment-102072 class function TStopwatch.GetTimeStamp: Int64; //## MSWINDOWS: if FIsHighResolution then QueryPerformanceCounter(Result) else Result := GetTickCount * Int64(TTimeSpan.TicksPerMillisecond); //## MACOS: Result := Int64(AbsoluteToNanoseconds( mach_absolute_time ) div 100); //## POSIX: clock_gettime(CLOCK_MONOTONIC, @res); TStopwatch relies also on GetTickCount as fallback, instead of GetTickCount64, which I hope is only a relict of older Windows versions and would not be seen on any modern ( 10yr ) PC anyway. -
Apple GetTimerTick64 - mach_absolute_time: How to handle the NSPrivacyAccessedAPIType privacy?
Rollo62 replied to Rollo62's topic in Cross-platform
Oh yes, I have forgotten about this thread, not considering that this is also related to GetTickCount64() & mach_absolute_time() Thanks, then I know which direction to go. -
Apple GetTimerTick64 - mach_absolute_time: How to handle the NSPrivacyAccessedAPIType privacy?
Rollo62 replied to Rollo62's topic in Cross-platform
Thanks, I will look into it. Strange, I have never seen such a Transporter issue yet, but time will come Does it clearly tell you the reason of the rejection? -
The status of "System.SysUtils.Now" timer resolution & accuracy
Rollo62 replied to Rollo62's topic in RTL and Delphi Object Pascal
Thanks for the proposals, but again, I'm not looking for QueryPerformanceCounter, but about the Now(); behaviour. Moreover I'm looking for a cross-platform sulution, not Windows alone. I dont need high performance for this task, the 15ms would be fine. It could be even OK, if 1 Sec., if this happens only very very rare ( but I would like to avoid that ). I hope that someone knows exactly where the 1 Sec. comes from and what conditions will make it to show up. -
The status of "System.SysUtils.Now" timer resolution & accuracy
Rollo62 replied to Rollo62's topic in RTL and Delphi Object Pascal
Like said, I know about performance counters, but I want to use Now() and GetTimerTick64() for other tasks, accepting the 15ms tolerances. The question is about, what the Now() 1 Sec. tolerance really means nowadays, is it gone or is it a valid case? -
The status of "System.SysUtils.Now" timer resolution & accuracy
Rollo62 posted a topic in RTL and Delphi Object Pascal
Hi there, I'm wondering if there have been any changes to the Now() function recently, related to the timer resolution. The Now() returnd TDateTime with Millisecond resolution, while officially they state the resolution is only 1 Sec. https://docwiki.embarcadero.com/Libraries/Athens/en/System.SysUtils.Now Note: Although TDateTime values can represent milliseconds, Now is accurate only to the nearest second. This topic is quite old, so already here discussed on SO https://stackoverflow.com/questions/14573617/how-accurate-is-delphis-now-timestamp With GetTimerTick() I can reach 7-16ms timer resolution, basically. !! And before somebody recommends high performance: I'm perfectly fine with the 15ms resolution and I want to use it. With Now() I can see similar results on all platforms, according to my tests, which is much better than the 1 Sec. stated in the docs, pretty much like the 7-16ms resolution. So what does the 1 Sec. really mean then, is this the worst-case scenario that might happen, while its perfectly 15ms all day long? Perhaps there have been changed something recently, in Delphi or Windows or other Platforms? Windows: System.SysUtils.Now(): is based on GetLocalTime(SystemTime); https://learn.microsoft.com/de-de/windows/win32/api/sysinfoapi/nf-sysinfoapi-getlocaltime https://learn.microsoft.com/de-de/windows/win32/api/minwinbase/ns-minwinbase-systemtime - I cannot find any restrictions like 1 Sec. there, not even a 15ms note. TThread.GetTickCount64: is based in GetTickCount64; https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-gettickcount64 - Which also had no restrictions, aside the known 15ms resolution. Macos/iOS: mach_absolute_time Android/Linux: clock_gettime(CLOCK_MONOTONIC, @res); Other Platforms were way beyond these accuracy - All should reach 1ms without problem. From the behaviour I can see in my tests, I would assume that Now() reaches the same 15ms resolution meanwhile on my current Win11 PC. Is this a safe assumpttion, or are there any other known restriction, which officially state the 1 Sec. resolution? This is why I think the following - Now() and GetTickCount64 both reach about 15ms resolution - Perhaps Now() could show resolution 1 Sec. in rare cases, e.g. under heavy load. - If that is true, I would also expect that also GetTickCount64() might break down to 1 Sec. resolution, under heavy load. Maybe somebody can clarify the situation, under current Windows versions, are there any official statements, aside from Embarcadero's docs? If there were such insights for the other platforms, I'm happy to see them too, but only Windows seems to be worst here. -
Apple GetTimerTick64 - mach_absolute_time: How to handle the NSPrivacyAccessedAPIType privacy?
Rollo62 posted a topic in Cross-platform
Hi there, I was looking into the GetTimerTick64 function and see that under Apple products, the mach_absolute_time function is used, to get a precide timer. Unfortunately Apple requires privacy declarations of mach_absolute_time: mach_absolute_time NSPrivacyAPITypes NSPrivacyAccessedAPICategorySystemBootTime For the usual usage of GetTimerTick64(), I would say the 35F9.1 would be most relevant. I would say this is used in any apps using some kind of internal timing or timerticks behaviour, that will fall under these requirements. Regarding such funktion, I think they can easily automatically test for this, if your app uses the function, or not, so it should already give a warning in an automated test from Apple Review. I do not use the absolute boot time, which they claim to be dangerous, but only derived timer ticks informations, which fall under the exception. My questions are: - Does the exception above mean, that you don't need to give such informations in the manifest? Or do you need to put it there anyway, no matter of exception or not, to declare that you make use of the mach_absolute_time() funtion. - Did Delphi already took care of this somehow ( I cannot see any of such entries in any manifest )? - How do you handle this, does anybody include these markers in the manifest? - Is anybody aware of, that Apple was rejecting an App in the Review, because of this? - If yes, how did you solved this with Apple? Perhaps you could share some logs or noted from their review, how they explain such issue to you. This would be interesting to clarify, before tapping into another Apple booby trap. -
iOS: XCode 15: MADDA - Make Delphi Debugging again - after 01.May 2024
Rollo62 replied to Rollo62's topic in Cross-platform
Thanks, but that was already clear. The problem is, that simulators are not behaving exactly like devices, especially with sensors and hardware stuff, this is why I rarely use them. -
Python seems most natual to me, since all 3 libraries may support it or have wrapper for that. Moreover is Python maybe also a natural way to use these kind of libraries ( but I'm not a Chemist ), so to put a Delphi UI on top would have a lot of benefits IMHO, while still keeping the full force of Python to C++ underneath. The additional burden to install and requiring Python-Libs for such project seems minor to me. Esspeciall when you think of combining Chemistry with AI features, I think you are already right in the Python world.
-
[Fmx, Macos64] [dccosx64 Error] E2597 ld: warning: directory not found
Rollo62 replied to Rollo62's topic in Cross-platform
This topic has nothing to do with Macos, FMX, Spring4D, Kastri or whatsever. This error was caused by a region, which was a leftover from Copy-Paste code from Windows, which I shouldn't do in the first place. The Region {$REGION 'Windows helper functions'} function SetThreadExecutionState(esFlags: EXECUTION_STATE): EXECUTION_STATE; stdcall; external 'kernel32.dll'; was hiding this Windows-Kernel related kernel reference, which was never used anywhere, but this one line never showed up as an error at this point. This tells me, that using regions to hide code, may also hide code to spot obvious failures sometimes.- 10 replies
-
- firemonkey
- fmx
-
(and 1 more)
Tagged with:
-
Programming with AI Assistance: A personal reflection.
Rollo62 replied to Juan C.Cilleruelo's topic in Tips / Blogs / Tutorials / Videos
Yes, but not because its irrelevant. But that's because even the last snoozer has realised that by now.