1

I am using MVP pattern in my GWT project (Guice and Dispatch and..)

But each RPC to the server after 30 sec after last RPC take a delay(about 1 sec). IT seems something is being cached in the server for 30sec and guess it is for Guice runtime injection or Dispatcher.

How to kill this delay?

Nav
  • 4,450
  • 10
  • 53
  • 84

2 Answers2

1

Use a profiler to see where the time is actually spent, the JDK comes with VisualVM which I would try first.

Guice injection might take a little time to analyze the class and dependency structure, but that work is only done when you call Injector.inject(...) which you should only call when the servlet is initialized.

Christoph Dietze
  • 869
  • 2
  • 7
  • 14
0

Make sure you don't initialize the Guice injector for every request, the injector should be built once and stored.

LiorH
  • 18,524
  • 17
  • 70
  • 98