Optimize Metadata.escapeId and Metadata.handleId

Description

Metadata.escapeId and Metadata.handleId both use regular expressions.

This shouldn't be a problem when these methods are called to format a CQL string, by it could be a problem in the process of serializing/deserializing binary data. This happens in the following places:

We could improve their performance by replacing the regular expressions with hardcoded matching algorithms.

Environment

None

Pull Requests

None
Fixed

Assignee

Unassigned

Reporter

Alexandre Dutra

Labels

None

PM Priority

None

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Minor
Configure