Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 11/29/18 in all areas

  1. Dalija Prasnikar

    My first Delphi 10.3 impressions

    Please fix IDE bugs! We have new icons Please fix IDE bugs! There is barely working dark theme Please fix IDE bugs!!! Now light IDE theme is broken too. I don't mind UI improvements, but IMO this were the wrong ones. I should probably say - I would not have anything against visual UI changes as long as they work properly. Visual changes are (should be) easier to implement than fixing some deeper IDE issues. But, currently IDE is falling apart left and right. Just because it looks better (depending on how you define better - my eyes cannot stand bluish theme for more than 10 minutes) it does not mean that it works better or is more usable.
  2. Arnaud Bouchez

    What is the fastest way to check if a file exists?

    FindFirst is definitively the slowest. It needs at least two calls (+ FindClose), and maintain some state in-between. GetFileAtributes() is the fastest under Windows, and fpaccess/euidaccess on POSIX systems. Note that a fallback to FileAge() is needed in case of sharing violation: function FileExists(const FileName: string): Boolean; {$IFDEF MSWINDOWS} // use GetFileAttributes: much faster than original, which uses FileAge=FindFirst var Attr: Integer; LastError: Cardinal; begin Attr := Integer(GetFileAttributesW(pointer(FileName))); if Attr <> -1 then Result := Attr and FILE_ATTRIBUTE_DIRECTORY = 0 else begin LastError := GetLastError; Result := (LastError <> ERROR_FILE_NOT_FOUND) and (LastError <> ERROR_PATH_NOT_FOUND) and (LastError <> ERROR_INVALID_NAME) and // (use FileAge to test SHARE_EXCLUSIVE files) ((LastError = ERROR_SHARING_VIOLATION) or (FileAge(FileName)<>-1)); end; end; {$ENDIF} {$IFDEF LINUX} begin Result := euidaccess(PChar(FileName), F_OK) = 0; end; {$ENDIF} (extracted from our Enhanced RTL source code) But the version currently included in Delphi 10.3 Rio SysUtils.pas is just as fast on Windows. On POSIX, it uses stats, which is slower than euidaccess().
  3. Stefan Glienke

    Has the migration tool EVER worked for you?

    Eye candy goes hand in hand with UX. If the usability sucks people will notice. If the UX is great but the UI is a bit dated people that are actually using it won't complain (much) but new users might pass by just because the first impression is not great visually. If all you got though is eye candy it might draw people but then let them down by crappy UX.
  4. Sure, but your clients will understand that the most important part of developing is the new skins šŸ™‚
  5. When searching for "windows fastest way to check if a file exists" I get lots of hits that claim there is no API for it and one should use GetFileAttributes or FindFirst instead. But there is PathFileExistsA which according to the description does exactly that: Check if a file exists. It has been around since Windows 2000. Yet, FileExists in System.Sysutils still uses GetFileAttributes. Am I missing something? Is maybe GetFileAttributes actually faster than PathFileExistsA ?
  6. Markus Kinzler

    Strange thing in System.Generics.Defaults.pas

    Was done on "Towel Day".
  7. Neutral General

    Strange thing in System.Generics.Defaults.pas

    Because 42 is the answer to the ultimate question of life, the universe and everything
  8. Primož Gabrijelčič

    OmniThreadLibrary 3.07.6

    Version 3.07.6 brings official support for Delphi 10.3 Rio, few changes and bugfixes. You can get it now on git, download the ZIP archive, install it with Delphinus or with GetIt (soon). For more information, visit OmniThreadLibrary home page or write your question on this forum. New features Implemented TOmniValue.LogValue. Implemented TOmniBlockingCollection.FromArray<T>, .FromRange<T>, and .AddRange<T>. Added timeout parameter to TOmniMREW.TryEnterReadLock and TOmniMREW.TryExitReadLock. Bug fixes Fixed race condition in TOmniBaseBoundedQueue.RemoveLink which could cause TOmniBaseBoundedQueue.Enqueue to return False when the queue was empty. Fixed race condition between TOmniResourceCount.[Try]Allocate and TOmniResourceCount.Release. [tnx to Stephen Melnyk] ThreadData is destroyed in the worker thread and not in the thread pool management thread. Reduced hints&warnings.
  9. Sherlock

    Display the title

    Minor hint on that subject: That is what the heart in the lower right corner is for.
  10. Tommi Prami

    10.3 Consumes 45% of my CPU

    Report to Embarcadero Issuer tracker, and put link into here. So we can Vote on it.
  11. David Heffernan

    Releasing memory devoted to arrays

    It is my experience that ignoring such defects in your code in the interests of saving time costs you more time in the medium term. It is my experience that putting off investing in learning debugging skills in the interests of saving time costs you more time in the medium term. I understand that your boss might not appreciate that.
  12. Primož Gabrijelčič

    What is the fastest way to check if a file exists?

    Why don't you test and tell us? šŸ™‚ (I have no idea but it would be good to know.)
  13. dummzeuch

    GExperts 1.3.12 beta for Delphi 10.3 Rio available

    There are two experts that accesses this menu: * Goto Previous Modification * Goto Next Modification Try to turn off these two an see whether this changes anything. Oddly enough, this doesn't happen here, but I have seen that same error message on Friday when I first started to work on GExperts and Rio. It went away later and I never saw it again, no idea what caused it.
  14. Uwe Raabe

    My first Delphi 10.3 impressions

    Not sure if that is a RAD thing. It is more a mixture of convenience and shortsightedness. Finding a clean and proper architecture is not an easy task. Often these projects are a result of short time and pressure and the lack of getting things right in the second go.
  15. The info is stored in .dct files: https://stackoverflow.com/questions/38672329/how-to-restore-or-copy-component-templates
Ɨ