Bug 19658 - Type canonicalization slow for the 2nd binary being loaded
Summary: Type canonicalization slow for the 2nd binary being loaded
Status: RESOLVED FIXED
Alias: None
Product: libabigail
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Dodji Seketeli
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-18 15:04 UTC by Dodji Seketeli
Modified: 2016-02-18 15:10 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dodji Seketeli 2016-02-18 15:04:17 UTC
This issue has first been reported downstream in Fedora at https://bugzilla.redhat.com/show_bug.cgi?id=1309400.

Basically, the reporter does this:

abipkgdiff --d1 nss-debuginfo-3.19.1-8.el6_7.i686.rpm --d2 nss-debuginfo-3.21.0-0.1.el6_7.i686.rpm nss-3.19.1-8.el6_7.i686.rpm nss-3.21.0-0.1.el6_7.i686.rpm

And it takes forever.

After looking into it a bit deeper, I think what takes a long time is the comparison of the libnssckbi.so shared library embedded in that package.

In particular, it looks canonicalizing certain class types from the *second* binary being loaded takes a lot of time.

Moreover, those class types are duplicated (present in several translation unit of the shared library), so canonicalizing them over and over again takes even more time.

It looks like the ODR-based optimization to speed up type canonicalization is not effective in the scenario.
Comment 1 Dodji Seketeli 2016-02-18 15:10:07 UTC
This should be fixed by commit https://sourceware.org/git/gitweb.cgi?p=libabigail.git;a=commit;h=e62901963ff1c48cfc99e0ec1b96d07af47328f4 in the master branch of the git repository.

The fix should be available in the 1.0.rc3 release to come.