Google真的是信心的保证!一个系统做了两周的压力测试,调优到一个流程11-12秒。时间始终上不去,最后用java profiler发现瓶颈在google-gson。gson效用占了一个事务的70%多。在google-gson的roadmap上看到2.0有大量改进:

Faster

Previous versions first parsed complete document into a DOM-style model (JsonObject or JsonArray) and then bound data against that. Gson 2 does data binding directly from the stream parser.

升级到gson 2.2版本之后,压力测试结果快了2秒。8.×-9.×秒之间!