After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 342695 - Optimization of copying of attributes in xsltCopyProp()
Optimization of copying of attributes in xsltCopyProp()
Status: RESOLVED OBSOLETE
Product: libxslt
Classification: Platform
Component: general
git master
Other All
: Normal enhancement
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2006-05-23 13:04 UTC by kbuchcik
Modified: 2021-07-05 10:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description kbuchcik 2006-05-23 13:04:41 UTC
In xsltCopyProp() (transform.c) the value of an attribute is
copied by the use of standard Libxml2 functions. However I think
we could optimize this.

The value string of the attribute is obtained using xmlNodeListGetString(),
then the value is set (together with the attribute node) with
xmlSetNsProp().

xmlSetNsProp() will perform an entity-encoding with
xmlEncodeEntitiesReentrant() and then generate the text/entity-ref
nodes by applying xmlStringGetNodeList().

I think the encoding and text/entity-ref generation step could be
skipped, since the value string obtained by xmlNodeListGetString() is:
1) freshly allocated memory
1) an UTF-8 encoded string
2) entities are substituted

I think we can just create a text node on the resulting attribute
node and attach the value string to it.

I would be glad if someone could verify this assumptions.
Comment 1 GNOME Infrastructure Team 2021-07-05 10:59:42 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/libxslt/-/issues/

Thank you for your understanding and your help.