Potential performance concerns with oxy_url() and oxy_xpath() ?

csun
Posts: 1

Potential performance concerns with oxy_url() and oxy_xpath() ?

Thu Dec 21, 2017 1:30 am

Hi,

I notice that if the CSS custom funtions like oxy_url() and oxy_xpath() are used for resolving links in DocBook5, something like:

Code: Select all

link:empty{
content:oxy_xpath(oxy_concat('doc("', oxy_url('${pdu}/', 'a.xml'), '")//@val')) !important;
}


it works, but apparently when it is turned on Oxygen would work noticeably slower. E.g. if I open a Docbook5 XML that contains many links, then turn on the link resolution, Oxygen can usually become unresponsive for even a few minutes.

Is it a known issue that oxy_url() and oxy_xpath() might take a bit long to process? If that’s the case, with Oxygen XML Editor 19, do we have the option of creating our own CSS custom functions to use in a framework, or do we need to create a whole new plugin to make link resolution faster?

Any suggestions are much appreciated.
Radu
Posts: 5224

Re: Potential performance concerns with oxy_url() and oxy_xpath() ?

Thu Dec 21, 2017 12:51 pm

Hi,

Indeed you should avoid using oxy_xpath or at least change the value of the "evaluate" parameter:

https://www.oxygenxml.com/doc/versions/19.1/ug-editor/topics/dg-xpath-function.html

to avoid evaluating the XPath very often like:

Code: Select all

content:oxy_xpath(oxy_concat('doc("', oxy_url('${pdu}/', 'a.xml'), '")//@val'), evaluate, static) !important;


To avoid oxy_xpath completely we have a CSS extension function called oxy_link-text():

https://www.oxygenxml.com/doc/versions/19.1/ug-editor/topics/dg-oxy-link-text.html

this function will call a Java-based API extension of an interface in our Author SDK, you can search for "LinkTextResolver" here:

https://www.oxygenxml.com/doc/versions/19.1/ug-editor/topics/dg-extensions-bundle.html

Our Author SDK which can be used to compile Java extensions can be found here:

https://www.oxygenxml.com/oxygen_sdk.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “DocBook”

Who is online

Users browsing this forum: No registered users and 1 guest