IBM DOORS DXL: Text search performance
This page provides a comparison of the performance (runtime) of various DXL string search functions.
Performance ComparisonGoal: Measure the runtime of a variety of DXL text search functions.
Task: Find the text 'The SW shall' in a DOORS module. Repeat the task 100 times for a meaningful runtime measurement.
Environment: IBM DOORS version 9.6.1
ConclusionThe DXL standard library function contains() is the fastest method to search text within a DOORS module.
However, its use requires mastering the creation, allocation and deletion of buffers.
The DXL standard library function search() gets an honorable mention for its versatile capability.
It accepts regular expressions and has equally fast runtime.
The DXL standard library function findPlainText() in conjunction with option matchCase = false has the worst runtime.
Which was to be expected.
Example script to find text using DXL function contains()
// disble 'runtime too long' error message pragma runLim, 0
Tested with IBM DOORS version 9.6.1
Open any module
Goto Menu -> Tools -> Edit DXL...
Paste DXL script test-string-search-speed.dxl into the editor and click the 'Run' button