Jump to content

Jud

Members
  • Content Count

    145
  • Joined

  • Last visited

Everything posted by Jud

  1. Jud

    VCL spinner

    Is there a VCL component that does something like the Windows spinner? I looked through the VCLs and didn't see one. And which group is it under (System, additional, Win, etc)? Added: Actually, I need something sort of like the ProgressGuage, where I update it periodically to show that a loop is still executing. I need to update it every few seconds to show that it is still executing, rather than a percentage finished.
  2. Jud

    VCL spinner

    Thanks, I'm going to look at those. However, I don't need one that runs until I stop it. I need one that verifies that the program is still running. I need to update it periodically. After I posted the message, I realized that a simple thing to do would be to have a label with just '*' and make it visible or not visible every X times through the outer loop. I had a strange problem the other day. I had an i7 running 14 threads of a big computation. It was going to take 15-16 days. It stopped running at 92% finished. None of the CPUs were executing the calculations, but strangely, everything in the Windows user interface still worked. It didn't bomb out or lock up. The calculation had been stopped for about 2 days when I realized it. I've never had that happen before. And nine other i7s running the same program on different data haven't had the same problem. This is to check to see if the program is still executing the calculations.
  3. Will there be a version of GExperts for version 12.3? I realize that this may be harder than usual for this version, due to the change in the IDE.
  4. Jud

    GExperts for Delphi 12.3?

    I used GExperrs with many versions of Delphi, through 12.2, and got to depending on it. I upgraded to 12.3 yesterday, and GExperts won't install into it. Then I realized that it was probably because of the IDE changes.
  5. I have 20 TMemos, named memo1 ... memo20. I have an integer which indicates which memo is to be written to. Is there a direct way to write to the desired memo, as opposed to a large, ugly case statement?
  6. Jud

    Multiple similar components

    Thanks, it works well. You guys are the greatest!
  7. Jud

    Problems with WaitForAll

    I have a multitasking program that has been running for weeks, but now I'm having problems adding WaitForAll to do some things when all tasks have been finished. First, some minor problems when I add WaitForAll: the main form is no longer responsive - I can't drag it or close it. Mainly though, are problems with updating the screen. Each task has a memo that it updates occasionally. Also, there are labels for the elapsed time and estimated remaining time. These work without WaitForAll but when WaitForAll is added, the program locks up if it tries to write to a memo or change the caption of a label. I know that these aren't thread safe, but they work if WaitForAll isn't in the program. Is there an easy way to get these to work?
  8. Jud

    Problems with WaitForAll

    Thanks. I don't think that it must be called in the main thread.
  9. Jud

    Problems with WaitForAll

    So do I need to put all of the stuff where the tasks are called and WaitForAll into a thread, or just WaitForAll? I've tried the memo updates with and without TThread.Synchronize.
  10. I write some programs in Delphi that make heavy use of the CPU for a long time. I used to use Windows 7, 8, and 10 on Sandy Bridge, Ivy Bridge, and Haswell i7 CPUs, with four hyperthreaded cores. For multitasking, I could get 98% CPU usage. Now I'm using Windows 11 on 12th-14th generation i7s, with eight hyperthreaded P-cores. But I cannot get more than about 40% CPU usage with 16 threads running. I look at Task Manager and Process Monitor, and see the under-utilization of the CPU. I have the power setting set for high performance. What caused this loss in performance - Windows or the new CPUs? And is there a way to utilize most of the CPU?
  11. Update I've spent a good deal of time experimenting with this. There are two points: 1. The people that said to look at performance instead of CPU utilization were right. 2. Modern CPUs are different from older ones. I've done optimizations for multitasking for more than 10 years. Years ago I did it with Sandy Bridge, Ivy Bridge, and Haswell i7s (32GB of DDR3) and Sandy Bridge and Ivy Bridge Xeons (128GB of DDR3) - all with four hyperthreaded cores. On those, generally the higher the CPU utilization, the more throughput. The exception is when memory bandwidth starts to be the limit - then it is usually better to be running seven tasks instead of eight (in my tests). But now I'm doing it on 12th- and 14th-generation i7s (64GB and 128HB of DDR5) and Kaby Lake Xeons (512GB of DDR4). The Kaby Lake Xeon has four hyperthreaded cores and it behaves like the aformentioned CPUs. The new i7s with eight hyperthreaded cores behave differently. When running 16 threads, the CPU was utilized under 50%. I tried running more threads - that utilized more of the CPU, percentage wise, but didn't help performance. I tried 20 threads, and that had the same performance as 16 threads. I tried 24 threads, and that had 3% more performance than 16. I tried 28 threads and that had 3% less performance than 16 threads. These all utilized a higher percentage of the CPU. So you really aren't gaining much, if anything, by running more than 16 threads, in my test, and you are using more electricity. In fact, 15 threads performs better than 16.
  12. Well, I used to be able to get to 100% usage, now I can't get 50%.
  13. I was allowing it to use all cores. But it doesn't seem to be putting my program on E-cores To be sure, I set the affinity to use only P-cores. Neither way gives the performance I expected.
  14. I installed this patch yesterday, and I'm having a lot of problems. Is anyone else having them? Problems include failing to terminate a program in the IDE, access violations, Find Declaration quits working, etc.
  15. Well, I need to download it again and try the installation again.
  16. It didn't show up on Getit (I noticed it on the Welcome page yesterday) - I did a complete install. I was having so many problems that I couldn't get work done, so I went back to the original 12.2. But I had many problems getting the patched version installed. It locked up several times, and I had to reboot. ------------------ Also, will they ever be able to transfer your settings to a new installation? I had to set all of the options twice yesterday.
  17. I want to show a confirmation question before closing the main form by clicking on the "x" in the upper right corner. The following is based on Delphi help, the example given in a link in tform.OnCloseQuery help. It used to work in another program but it doesn't work in my current program. I put "procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);" in the form's class. Then I have this, based on the example: procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean); begin if MessageDlg( 'Do you want to exit the program?', mtConfirmation, [mbYes, mbCancel], 0) = mrCancel then CanClose := false; end; The program starts and then I click a button to start some tasks. If I click on the "x" before the tasks are started, it closes immediately. If I do it after the tasks have started, it closes immediately if it is running from the EXE. If it is running from the IDE, it gives an access violation. What do I need to do to make it behave as intended (i.e. confirm before closing the form.)
  18. Jud

    Confirm before closing a form

    I added it manually because before when I clicked on "OnCloseQuery" in the form's inspector, it would not let me add it there, like the form OI usually does. But now it does, and is working. (I don't remember the error message I got when I tried c;licking on the event OnCloseQuery before.) Thanks for the replies!
  19. If I remember correctly, VCL ProgressBars used to show the percentage, in numerals. I'm trying to add one to a Delphi 12.1 project, and it isn't showing the percentage. I looked at the properties but I didn't see any that seemed like it would turn on the display of the percentage. Is there a way to show percentage on a TProgressBar in Delphi 12.1 VCL?
  20. Jud

    Show percentage in VCL TProgressBar

    TGuage might have been it.
×