Jump to content

David Heffernan

Members
  • Content Count

    3475
  • Joined

  • Last visited

  • Days Won

    171

Everything posted by David Heffernan

  1. This has always been fine here. How can this be reproduced?
  2. Could be anything. Could be that you are splitting a vcl app between an exe and a dll. Sounds like you haven't diagnosed the problem yet. That's what I would try to do first rather than trial and error ideas like you are asking us for help with.
  3. David Heffernan

    RemoteApp

    You could do that
  4. No. Longstanding limitation. Kinda sucks. Can't have multiple helpers which would be another way to do what you want.
  5. David Heffernan

    Delphi’s TZipFile working on a stream

    The ZIP file headers are parsed and stored when you call Open. So I don't think this should be especially slow. However, it is wasteful to call FileNames repeatedly because it is a property with a getter method that makes a new dynamic array every time you access it. So I'd do it like this var zip := TZipFile.Create; try zip.Open(fZipFilename, zmRead); for var fileName in zip.FileNames do Memo1.Lines.Add(fileName); finally zip.Free; end; (not sure if the inline var inside the for declaration works, but if not you know what to do!) Although actually in this case you could simply write var zip := TZipFile.Create; try zip.Open(fZipFilename, zmRead); Memo1.Lines.AddStrings(zip.FileNames); finally zip.Free; end;
  6. David Heffernan

    Delphi’s TZipFile working on a stream

    What was you actual code. The code here is not real.
  7. Is TryStrToFloat the bottleneck? Or is it reading the text file? Did you profile yet?
  8. Do you need to know whether or not the value is in the valid range of your target data types? Also if you need to do this fast then you probably won't be using a string for each line becasue that involves heap allocation.
  9. David Heffernan

    Windows 11 checkbox and radio button color

    In this case I don't understand what you are saying. I thought you wanted to override the default system theme. But it seems I misunderstood you.
  10. David Heffernan

    Many TTasks

    Just to be pedantic, but more "tasks" than CPUs is not a problem. The problem is when you have more runnable threads than CPUs.
  11. David Heffernan

    Many TTasks

    So what? Assuming your tasks for CPU bound then set the thread pool thread count to match the number of CPUs, and let the scheduler do its job.
  12. David Heffernan

    Many TTasks

    The asker already knows this. The question is not how to find N but how to control task scheduling on thread pools.
  13. David Heffernan

    Many TTasks

    Machines have a fixed and well defined number of processors that can readily be queried. So it's trivial to know what N is.
  14. David Heffernan

    Many TTasks

    Create a thread pool with 8 threads and assign the tasks to that thread pool. Incidentally does anybody know why the default thread pool has more threads than CPUs?
  15. David Heffernan

    Windows 11 checkbox and radio button color

    Isn't the entire point of the system theme that there is system wide consistency?
  16. David Heffernan

    Avoiding use of BPLs

    You've probably answered the question yourself. DesignIde brings the others with it. Now your exe will link to different instances of rtl and vcl I think. Statically linked rather than runtime packages. Which might be a problem. Solution likely to involve getting rid of dependency on DesignIde.
  17. David Heffernan

    Delphi compatibility with Windows 11?

    Article says the bugs will be fixed shortly
  18. David Heffernan

    Delphi compatibility with Windows 11?

    From my brief time with win11 it seems really responsive. Start menu search is instant which is huge.
  19. David Heffernan

    Kaspersky and Compile/Linking

    The only real solution is to attack the source of the problem. Kaspersky.
  20. Not wishing to defend Perl too much, but that function could be written more clearly with a named variable, but it would look much the same in any language. The regex wouldn't change. In fact the regex match and substitute syntax in Perl is actually very readable. I don't think the Delphi version would be clearer.
  21. When has an abundance of visual noise been a problem before with Pascal, the most verbose of languages!!!
  22. You shouldn't add any files to the system directories, either system32 or syswow64. They are for the system.
  23. David Heffernan

    Is Graphics32 ready for Delphi 11 yet?

    Well done. It usually turns out that there's very little that needs to be done to update a library to a new version, but the number of errors can be daunting until you realise that they are all the same error!
  24. David Heffernan

    Is Graphics32 ready for Delphi 11 yet?

    Have you tried cloning the latest from the repo and then compiling it?
  25. Does TMonitor work correctly yet?
×