so much loading of libraries

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark

Locked
mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

so much loading of libraries

Post by mwieder » Thu Jul 01, 2021 1:00 am

When I build locally from the develop branch and then launch from the linux-x86_64-bin I see this in the terminal:

[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0
[210112] MCU_library_load libpango-1.0.so.0 -> libpango-1.0.so.0
[210112] MCU_library_load libpangocairo-1.0.so.0 -> libpangocairo-1.0.so.0
[210112] MCU_library_load libpangoft2-1.0.so.0 -> libpangoft2-1.0.so.0

Why so much thrashing? Is this reloading all three libraries every time another font is discovered?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9958
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: so much loading of libraries

Post by FourthWorld » Thu Jul 01, 2021 3:32 am

I wonder if that may be related to the huge number of font init calls at boot, which has caused issues with at least one with host:
https://quality.livecode.com/show_bug.cgi?id=14115
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: so much loading of libraries

Post by mwieder » Fri Jul 02, 2021 1:08 am

Digging into this a bit further, I see MCU_library_load calls MCSLibraryCreateWithPath, which doesn't seem to exist in the source code but is apparently constructed during the build process by code in weak_stub_maker.pl. And has a bewildering comment by way of explanation. I've read this six times today and still don't have a clue as to what it means.
# MCSupportLibraryLoad and friends have engine dependency - for example
# when weak linking to the crypto library we rely on revsecurity living
# next to the executable, which is resolved using MCcmd. We also rely on
# mappings from dynamic library names to paths which can be custom-
# defined as deploy parameters. Hence we need to use special
# implementations for access to the libfoundation system library API
# if we require no engine dependency.

Locked

Return to “Engine Contributors”