Commit Graph

11 Commits

Author SHA1 Message Date
Marco Bubke
9f805b7e8a ClangRefactoring: Improve follow symbol and usage
Change-Id: Idb42010443e4560489ef067e54d05b4e567598e9
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:53:45 +00:00
Marco Bubke
c174eb378a Clang: Reduce database accesses
If we prefetch data from the database to the caches we reduce the database
transaction calls which are quite expensive.

Change-Id: I617a0d886807402e0a94291a913a77f989970b55
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:53:32 +00:00
Marco Bubke
199746143a Clang: Bulk add project file paths to database
This project part container generation because there is not anymore one
single access to the database for every file path.

Change-Id: I5f82022262fe89a976729d48ee4f098b74a1e1d1
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:52:09 +00:00
Marco Bubke
947cb9ed4e Clang: Improve file path cache
Change-Id: I940dc63c0fc95fbb826ed7d19a1ac1e4db5a542c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:51:56 +00:00
Marco Bubke
f9fb4508d4 Clang: Optimize file path cache
We now fetch all directories and sources from the database at file
path cache creation.

Change-Id: I92510b49a234128f4c82b840611db82ead3f1a54
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-08-27 11:51:28 +00:00
Marco Bubke
bbd58ca30b Clang: Watch directories instead of files
Because there a limited resources to watch files we watch now directories.
So we need much less resources.

Change-Id: Iac558832e9521a7a1a67c5ea99b42ad1b0b5129c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2019-06-27 12:31:52 +00:00
Marco Bubke
6eb620238b Clang: Refactor FilePathId
We don't need the directory id any more. It's not used widely any way.

Task-number: QTCREATORBUG-21443
Change-Id: Ia95ea4c72fe9530ac56262f61f17faca04d313ba
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-11-08 12:51:15 +00:00
Marco Bubke
ff1ce3a475 Clang: Honor directories for the file name
The file name id must be unique for very entry, so the directory id must be
incorporated too. Now there is always one unique integer id for every
file path. The directory id is there to access and compare the directory
much faster but not provide any data to the uniqueness of the id.

Change-Id: I0f9a2ca70bc9dda0ce32ebc45eb7b082821eb909
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-03-28 14:01:12 +00:00
Marco Bubke
fb0b5d9d9b Clang: Make it more clear that the FilePathId.filePathId is not shared
The name fileNameId could imply that the id shared for the same file name
which is not the case.

Change-Id: I27310a8994c2d9e9bb0f0aed2094bd988309c710
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-01-22 13:22:30 +00:00
Marco Bubke
a15250051d Clang: Handle native file in the file cache
Different types are introduced for normalized and native file path. So the
compiler is warning you if you try the wrong format.

Change-Id: I1da0686b142cbf9bb7578468c2b50f90a94cebf9
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-11-23 11:55:15 +00:00
Marco Bubke
d2e15e5f1e Clang: Add file cache
The database is using file path integer ids to handle file paths because
otherwise we would save many redundant data. This patch is improving it
further with the introduction of a database based file path cache. The
entries are now divided in a directory path and file name. This is quite
handy for directory based file watching.

Change-Id: I03f2e388e43f3d521d6bf8e39dfb95eb2309dc73
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2017-10-05 17:36:37 +00:00