Search code examples
gwtdto

Influence of DTOs number to GWT application performance


Can the number of DTOs affect the performance of GWT applications?

My question comes from following issue. Lets assume that I have to transfer 3 different objects but all with only one String field. Should I create and use 3 different DTOs with meaningful names or one generic (sth like StringDTO).

Thank you for your help.


Solution

  • Unless you plan to transfer thousands of these objects per second, the difference in performance would be negligible, if any.

    I always prefer to go with the code that is easier to read, maintain and extend, unless there is a very significant performance issue that may require a different approach.