Quesion about string intern

Behnam Hatami
Added about 4 years ago

I have a question about intern in tigase,

as we know, using staticStr methods of element is faster than non staticStr.

so I think adding the attached patch could be usefull for speed improvement.

and when I see the code, there are a lot of area in tigase server code, that can use staticStr functions and there shouldn't be any problem, for example we can change

final Element q = packet.getElement().getChild("query");

in to

final Element q = packet.getElement().getChildStaticStr("query");
patch.txt (852 Bytes) patch.txt

Replies (1)


Added by Artur Hefczyc TigaseTeam about 4 years ago

I agree this might be useful, we already have similar methods in the Element class. We have added "StaticStr" methods a while ago and we slowly migrate all the parts of the Tigase code to use the new APIs.

However, to be able to accept the patch we need your source code disclaimer. Please submit a patch through the ticket system: and remember to tick "source code disclaimer" field.