Review Request 122071: Fix parsing environment hash
Milian Wolff
mail at milianw.de
Thu Jan 15 20:41:29 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/122071/#review74101
-----------------------------------------------------------
duchain/clangparsingenvironment.cpp
<https://git.reviewboard.kde.org/r/122071/#comment51462>
I'm not good with hash functions, so I'm reluctant to accept this. I certainly see the issue though. Maybe we could instead do the following, which wouldn't be more work /and/ save to use:
convert the hash to a list of QByteArrays (or std::strings) of the form "-DFOO=Bar", i.e. just as we need it later on in ParseSession anyways. This list can then be sorted for the hash function and we could keep using qHash + KDevHash::operator<<.
duchain/clangparsingenvironment.cpp
<https://git.reviewboard.kde.org/r/122071/#comment51463>
I'm afraid this maybe introducing subtle bugs. The order of the include paths is /not/ random. If you have the same file in two folders, the order of the include paths decides which one to prefer over the other, no?
- Milian Wolff
On Jan. 15, 2015, 10:26 a.m., Sergey Kalinichev wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/122071/
> -----------------------------------------------------------
>
> (Updated Jan. 15, 2015, 10:26 a.m.)
>
>
> Review request for KDevelop.
>
>
> Repository: kdev-clang
>
>
> Description
> -------
>
> The hash should stay the same, no matter what order of includes/defines is.
>
> With this patch applied subsequent project loading time reduced from 150 to 10 seconds for the kdev-clang project.
>
>
> Diffs
> -----
>
> duchain/clangparsingenvironment.cpp f73822f
> duchain/clangparsingenvironmentfile.cpp 88cbbe0
> tests/test_duchain.h 22bacd5
> tests/test_duchain.cpp cd21635
>
> Diff: https://git.reviewboard.kde.org/r/122071/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Sergey Kalinichev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150115/1d51cf22/attachment.html>
More information about the KDevelop-devel
mailing list