我希望 DWR 透明地批处理在处理同一事件过程中完成的所有远程调用。
原因是在 Javascript 中处理一个事件必须只需要很短的时间,并且在同一时间内不能发生任何其他事情。因此,如果我要进行许多调用,我希望 DWR 透明地对它们进行批处理。那可能吗?怎么办?
最佳答案
DWR网站解释Call Batching .
来自another DWR page :
Remote calls can be batched together to reduce latency. Options can also be set on the endBatch() method:
dwr.engine.beginBatch(); Remote.methodInBatch1(params, callback1); Remote.methodInBatch2(params, callback2); dwr.engine.endBatch({ timeout:3000 });
关于java - dwr 中的透明批处理远程调用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/662013/