Bug 186594
Summary: | [WPE] Pack inspector resources in a .gresource file instead of a shared library | ||
---|---|---|---|
Product: | WebKit | Reporter: | Adrian Perez <aperez> |
Component: | WPE WebKit | Assignee: | Adrian Perez <aperez> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | bugs-noreply, calvaris |
Priority: | P2 | ||
Version: | Other | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=193826 https://bugs.webkit.org/show_bug.cgi?id=280512 https://bugs.webkit.org/show_bug.cgi?id=281298 https://bugs.webkit.org/show_bug.cgi?id=281771 |
||
Bug Depends on: | 186588 | ||
Bug Blocks: | 280561 |
Adrian Perez
For the WPE port the inspector resources are bundled using for loading with
GResource, built into an shared library which contains the bundled data,
and finally loaded on-demand using GModule (which ends up using “dlopen”)
when first needed.
There are no other contents in the shared library, so we could as
well generate a “*.gresource” data file instead (which is a GVDB
file), and load it using “g_resource_load” (instead of using GModule).
There are a few small advantages:
- Disk space savings. GDVB files are slightly more compact than
a shared library, and are mmap'd when loaded.
- Loading the data does not involve the dynamic linker (no need for
parsing an executable object, resolving symbols, etc.).
- No intermediate build steps: the XML manifest gets built into the
.gresource data file directly (compare with the current approach,
which is: XML manifest → C source → object file → shared library).
While there's nothing particularly important in the list above, it
still would be nicer to use a data file instead of a shared library
for the inspector resources.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Adrian Perez
FWIW, the .gresource files being data, I understand the file
would be installed into “${DATADIR}/wpe-webkit-${VERSION}”
instead of “${LIBDIR}/wpe-webkit-${VERSION}” (as currently done).
lisiwei
Pull request: https://github.com/WebKit/webkit/pull/33654
EWS
Committed 284269@main (8ceb1da47e75): <https://commits.webkit.org/284269@main>
Reviewed commits have been landed. Closing PR #33654 and removing active labels.