michael-o commented on PR #49:
URL: https://github.com/apache/velocity-engine/pull/49#issuecomment-2312442897

   > > If I look at Tomcat's source code how it handles prepared statements
   > 
   > Well, this piece of code is called only once during the login process, so 
they just don't bother factorizing statements preparation. Here, there would be 
two prepared statements not even by thread but by distinct template. If a web 
page gathers ten templates, that'd make twenty statements preparation for a 
single page view.
   > 
   > The DatasourceResouceLoader should not be a toy example if we include it 
in the sources, but a functional one with reasonable defaults. Each and every 
serious implementation would have to redo the same work.
   
   I see your point I still have the following problems:
   
   * You are adding  a new dependency tree many likely don't need at all
   * JDBC drivers can also cache efficiently
   * This should really be opt-in rather than default
   
   I assume that a reentrant lock would introduce a bottleneck? Maybe we can 
create a derived data source loader which does this magic for those who need it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org
For additional commands, e-mail: dev-h...@velocity.apache.org

Reply via email to