Jump to content

Der schöne Günther

Members
  • Content Count

    690
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by Der schöne Günther

  1. Der schöne Günther

    Delphi for Mobile Applications

    My experience is from a long time ago (around 2016), so things might have changed completely (hopefully for the better). All in all, it was disastrous. It was supposed to be some kind of dashboard / remote control app for industrial production lines. It had to be presented at an exhibition. There were numerous problems I never really got behind, and which each change, I felt more and more helpless because of extremely limiting debugging and analysis capabilities. Battery consumption was inexplicably high We used the TeeChart Pro library for some graphical displays which was extremely buggy on FireMonkey. Steema acknowledged some of the bugs, but never fixed them or provided workarounds. It was around fall, and Apple released a new iOS version. Debugging capabilities in RAD Studio broke and I was more or less flying blind. I think something like this still happens today. Overall performance was completely random, sometimes it was stuttering extremely badly or just terminated. I suspected memory leaks in FireMonkey or TeeChart Pro, but had no way of tracking that down. I felt that if I had stayed with "native" development options (like Apple XCode), I might have had better chances of getting behind such problems. At that time, it was impossible to re-use much existing Delphi because because of the fundamentally different memory management model. I haven't followed it, but I think this should no longer be a problem: Directions for ARC Memory Management in Delphi All in all, it was considered a failure and we scratched it completely.
  2. Der schöne Günther

    12.2 Instability

    Windows Event viewer might be helpful to determine why exactly it crashed. For me (mostly working with 10.0 Seattle) it is rather "normal" for it to silently collapse because of memory exhaustion after working with it for an hour or two. bds.exe will then just silently terminate.
  3. Der schöne Günther

    Simole threads providing progress info

    It sounds rather straightforward. From your description, I don't even see the need for using TThread. Instead, I would Declare your each of your work items as a Task (from the System.Threading unit) Put all those tasks in an dictionary, so you have a relationship between your tree view item and the task Start the tasks In a timer, check which tasks are finished, so you can tick your checkmark in the treeview See Parallel Programming Library Tutorials - RAD Studio for more information and examples.
  4. Der schöne Günther

    win11 24h2 msheap fastest

    Can somebody shed some light on that? I don't really know much about heap fragmentation, but it is one of my worst nightmares.
  5. Der schöne Günther

    What is your Update Process?

    I spin up a new VM and start fresh.
  6. Der schöne Günther

    function: how to return nil

    Why did you mark the parameter as var in the first place?
  7. Der schöne Günther

    creating a frame at runtime

    Didn't even know that was possible. Thanks.
  8. Der schöne Günther

    creating a frame at runtime

    Don't forget to set the Name property of your frame to something unique. Otherwise, it will throw a runtime exception when you have several components with identical name in the same container.
  9. Der schöne Günther

    function: how to return nil

    Jesu mentioned using Data.DB.TParams.ParamByName which returns a Data.DB.TParam object. TParam has a property Value which is a Variant. As much as I loathe these things, the approach by @Virgo seems to be the most fitting.
  10. Der schöne Günther

    Why Aren't You Using SQLite?

    I am using Sqlite exclusively, because I don't know anything else.
  11. You may be able to use tools like "Dependency Walker" to find out which dependency includes avrt.dll. I wouldn't be surprised, however, if that's straight from the VCL. The flags in (2) seem to be PE header flags in your executable. I wouldn't even be surprised if half of them are some "Visual Studio only" flags by Microsofts Linking executables. Can't the auditor be a little more helpful and provide some context?
  12. Der schöne Günther

    Delphi takes 9 seconds to start/shutdown an empty application

    I honestly do not think that this is related to Windows itself. You need to be more specific what exactly takes time, then we can try to find out what is causing this. An empty VCL forms application takes about a second to start up in the debugger (Delphi 10) A monolithic real world application with a bunch of dlls takes about six seconds for me. I have learned to live with it ☕ Occasionally, I use Delphi 11 for a few other projects, and I remember it being slightly faster and flickering less.
  13. Der schöne Günther

    Delphi takes 9 seconds to start/shutdown an empty application

    I am not familiar with Delphi 11 (yet), but at least with Delphi 10, most of the time of starting and ending a debugging session is spent with the IDE flickering and constantly redrawing itself over and over.
  14. Der schöne Günther

    What are you using AI code-gen tools for that's working well?

    Another thing that worked surprisingly well for me is code review. I've had copilot complain about too little documentation in certain areas, point out a possible deadlock and suggest external libraries that saved me from reinventing the wheel. I haven't tried out reviewing Delphi code, though.
  15. Der schöne Günther

    Records as TDictionary keys

    It it sufficient to have an equality operator or is the GetHashCode(): Integer method needed as well?
  16. Der schöne Günther

    ANN: New Swagger/OpenAPI Client Generator for Delphi

    Just for my understanding as I went through the blogpost: This is a code generator for the mORMot library, not the Delphi RTL, correct?
  17. TValue is designed to hold any type, not just "simple" ones. There is no way to marshal a string representation like "(record)" or "(interface @ 02549BD0)" back into what they once were. Maybe what you are looking for is a mechanism to serialize any record/object in memory into a string (or raw bytes), store them, and later de-serialize them?
  18. Der schöne Günther

    Weird new IOS Issue-

    That site seems geolocked to the US, I only get an error 403. GeoPeeker - A tool for viewing sites from different geographic locations
  19. Der schöne Günther

    TChart Performance of whole form

    It has been a few years since we last tried to use TeeChart Pro on iOS/FMX but it was horrible. Drawing issues, performance was abysmal and power consumption was also pretty bad. In case you have an active subscription, you can raise an issue with Steema. If not, you're probably better off using a WebView and a free Javascript charting library.
  20. Der schöne Günther

    "for i in" goes in reverse

    In cases like this, I really love code editors and environments that can tell me right away to what type something infers by just tapping Ctrl+Alt...
  21. Der schöne Günther

    Colors, complementary, triadic

    "Finding" the other colours is just adding 180° (complementary) or 120° (triads) on the hue value of your HSL colour. Source: https://de.slideshare.net/slideshow/basic-color-theory-for-presentation-design-part-ii/53370835#44
  22. Der schöne Günther

    Colors, complementary, triadic

    Wouldn't it be sufficient to convert a RGB color to HSL? There is System.UIConsts.RGBtoHSL(..)
  23. Der schöne Günther

    Parallel.For optimization

    It seems like you are constantly resizing arrays (or creating new ones). I am not sure how much you can tweak/optimize the memory manager that ships with Delphi, but you might want to investigate other memory managers, like this fork of FastMM4: maximmasiutin/FastMM4-AVX: FastMM4 memory manager for Delphi and FreePascal (free pascal/Lazarus). A fork with improved synchronization between the threads that gives performance benefits on thread-heavy applications. Proper synchronization techniques are used depending on context and availability, i.e. umonitor/umwait, spin-wait loops, SwitchToThread, critical sections, etc (github.com)
  24. Der schöne Günther

    Thread leaks report (FastMM4)

    Most probably because it is like that in many other languages.
  25. Der schöne Günther

    Thread leaks report (FastMM4)

    I am absolutely bewildered. That is absolutely not true. See: Methods (Delphi) - RAD Studio (embarcadero.com) or: https://stackoverflow.com/a/39110161 This is the first time I ever heard something like this.
×