![]() ![]() If we keep the list sorted we can avoid this. While a much smaller issue (~100ms), restoring old caches makes use of indexOf(), giving us O(n²) instead of O(n). We could furthermore sort the extension list to speed up matching. Secondly it is matched using RegExp which is probably not optimal. We check on extension and we have quite a bit of them. (Do consider delayed directory listing loading though.)Īlternative implementations: QDirIterator boost::filesystem Both do not filter its results! Use QDirIterator if boost is not significant faster.įiltering might be what is slowing down entryInfoList(). ![]() (Tested on Linux) This is not an issue on startup, but when such a directory have rapid changes, it freezes the UI as it constantly tries to reload. Using QDir::entryInfoList() is slow, in a directory containing 5000+ files it easily takes several seconds. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |