Jump to content

Jud

Members
  • Content Count

    135
  • Joined

  • Last visited

Community Reputation

1 Neutral

Technical Information

  • Delphi-Version
    Delphi 12 Athens

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. 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.
  2. Well, I used to be able to get to 100% usage, now I can't get 50%.
  3. 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.
  4. No, it is a desktop.
  5. 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?
  6. Well, I need to download it again and try the installation again.
  7. 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.
  8. 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.
  9. 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!
  10. 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.)
  11. Jud

    Show percentage in VCL TProgressBar

    TGuage might have been it.
  12. Jud

    Show percentage in VCL TProgressBar

    Thanks, just my faulty memory from some years ago. I just stuck a label above it - that is what I must have done way back when.
×