Improve speed of cdata detection