I've made some profiling on my application which uses smpp in multithreading mode. I saw that 30% of the send(Request request, boolean asynchronous) method from org.smpp.Session is spent on request.debugString() method. See the code below:
///////////////////////////
final private Response send(Request request, boolean asynchronous)
throws ValueNotSetException, TimeoutException, PDUException, IOException {
debug.enter(DSESS, this, "send(Request)");
Response response = null;
debug.write(DSESS, "Sending request " + request.debugString());
.....
/////
I think first we should check the debug level and then call debug.write(DSESS, "Sending request " + request.debugString());.