<p dir="auto">persist datasource implementation YAML in registry center like this is not good:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="ds_0: !!org.apache.commons.dbcp.BasicDataSource
  accessToUnderlyingConnectionAllowed: false
  defaultAutoCommit: true
  defaultReadOnly: false
  defaultTransactionIsolation: -1
  driverClassName: com.mysql.jdbc.Driver
  initialSize: 0
  logAbandoned: false
  maxActive: 8
  maxIdle: 8
  maxOpenPreparedStatements: -1
  maxWait: -1
  minEvictableIdleTimeMillis: 1800000
  minIdle: 0
  numTestsPerEvictionRun: 3
  password: ''
  poolPreparedStatements: false
  removeAbandoned: false
  removeAbandonedTimeout: 300
  testOnBorrow: false
  testOnReturn: false
  testWhileIdle: false
  timeBetweenEvictionRunsMillis: -1
  url: jdbc:mysql://localhost:3306/demo_ds_0
  username: root
  validationQueryTimeout: -1
ds_1: !!org.apache.commons.dbcp.BasicDataSource
  accessToUnderlyingConnectionAllowed: false
  defaultAutoCommit: true
  defaultReadOnly: false
  defaultTransactionIsolation: -1
  driverClassName: com.mysql.jdbc.Driver
  initialSize: 0
  logAbandoned: false
  maxActive: 8
  maxIdle: 8
  maxOpenPreparedStatements: -1
  maxWait: -1
  minEvictableIdleTimeMillis: 1800000
  minIdle: 0
  numTestsPerEvictionRun: 3
  password: ''
  poolPreparedStatements: false
  removeAbandoned: false
  removeAbandonedTimeout: 300
  testOnBorrow: false
  testOnReturn: false
  testWhileIdle: false
  timeBetweenEvictionRunsMillis: -1
  url: jdbc:mysql://localhost:3306/demo_ds_1
  username: root
  validationQueryTimeout: -1"><pre class="notranslate"><span class="pl-ent">ds_0</span>: <span class="pl-s">!!org.apache.commons.dbcp.BasicDataSource</span>
  <span class="pl-ent">accessToUnderlyingConnectionAllowed</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">defaultAutoCommit</span>: <span class="pl-c1">true</span>
  <span class="pl-ent">defaultReadOnly</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">defaultTransactionIsolation</span>: <span class="pl-c1">-1</span>
  <span class="pl-ent">driverClassName</span>: <span class="pl-s">com.mysql.jdbc.Driver</span>
  <span class="pl-ent">initialSize</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">logAbandoned</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">maxActive</span>: <span class="pl-c1">8</span>
  <span class="pl-ent">maxIdle</span>: <span class="pl-c1">8</span>
  <span class="pl-ent">maxOpenPreparedStatements</span>: <span class="pl-c1">-1</span>
  <span class="pl-ent">maxWait</span>: <span class="pl-c1">-1</span>
  <span class="pl-ent">minEvictableIdleTimeMillis</span>: <span class="pl-c1">1800000</span>
  <span class="pl-ent">minIdle</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">numTestsPerEvictionRun</span>: <span class="pl-c1">3</span>
  <span class="pl-ent">password</span>: <span class="pl-s"><span class="pl-pds">'</span><span class="pl-pds">'</span></span>
  <span class="pl-ent">poolPreparedStatements</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">removeAbandoned</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">removeAbandonedTimeout</span>: <span class="pl-c1">300</span>
  <span class="pl-ent">testOnBorrow</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">testOnReturn</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">testWhileIdle</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">timeBetweenEvictionRunsMillis</span>: <span class="pl-c1">-1</span>
  <span class="pl-ent">url</span>: <span class="pl-s">jdbc:mysql://localhost:3306/demo_ds_0</span>
  <span class="pl-ent">username</span>: <span class="pl-s">root</span>
  <span class="pl-ent">validationQueryTimeout</span>: <span class="pl-c1">-1</span>
<span class="pl-ent">ds_1</span>: <span class="pl-s">!!org.apache.commons.dbcp.BasicDataSource</span>
  <span class="pl-ent">accessToUnderlyingConnectionAllowed</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">defaultAutoCommit</span>: <span class="pl-c1">true</span>
  <span class="pl-ent">defaultReadOnly</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">defaultTransactionIsolation</span>: <span class="pl-c1">-1</span>
  <span class="pl-ent">driverClassName</span>: <span class="pl-s">com.mysql.jdbc.Driver</span>
  <span class="pl-ent">initialSize</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">logAbandoned</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">maxActive</span>: <span class="pl-c1">8</span>
  <span class="pl-ent">maxIdle</span>: <span class="pl-c1">8</span>
  <span class="pl-ent">maxOpenPreparedStatements</span>: <span class="pl-c1">-1</span>
  <span class="pl-ent">maxWait</span>: <span class="pl-c1">-1</span>
  <span class="pl-ent">minEvictableIdleTimeMillis</span>: <span class="pl-c1">1800000</span>
  <span class="pl-ent">minIdle</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">numTestsPerEvictionRun</span>: <span class="pl-c1">3</span>
  <span class="pl-ent">password</span>: <span class="pl-s"><span class="pl-pds">'</span><span class="pl-pds">'</span></span>
  <span class="pl-ent">poolPreparedStatements</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">removeAbandoned</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">removeAbandonedTimeout</span>: <span class="pl-c1">300</span>
  <span class="pl-ent">testOnBorrow</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">testOnReturn</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">testWhileIdle</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">timeBetweenEvictionRunsMillis</span>: <span class="pl-c1">-1</span>
  <span class="pl-ent">url</span>: <span class="pl-s">jdbc:mysql://localhost:3306/demo_ds_1</span>
  <span class="pl-ent">username</span>: <span class="pl-s">root</span>
  <span class="pl-ent">validationQueryTimeout</span>: <span class="pl-c1">-1</span></pre></div>
<p dir="auto">Because every time to load YAML from registry center and convert them to object will create new object of database connection pool, it will cost resource of memory and database connection.</p>
<p dir="auto">It should persist configuration info only and convert to configuration object when loading from registry center.</p>
<p dir="auto">So the tasks should be:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Define connection pool configuration object</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Auto convert from connection pool configuration and connection pool, use reflection</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Replace persist content of Sharding-JDBC's <code class="notranslate">datasource</code> node</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Replace persist content of Sharding-Proxy's <code class="notranslate">datasource</code> node</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Refactor <code class="notranslate">DataSourceParameter</code>, make consist with reflected connection pool configuration</li>
</ul>
<h3 dir="auto">Brief description of bug</h3>
<h4 dir="auto">Self-Diagnosis</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reviewed the documentation.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have reviewed the Wiki.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have tried to use the latest version.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the issues for an answer to my question.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> I have searched the web for an answer to my question.</li>
</ul>
<h4 dir="auto">Environment</h4>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Operating System: win10</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox" checked=""> Plugin version: 5.1<br>
Using the JDBC batch function, insert tens of thousands of data, when you do not use ShardingJDBC, it is less than 1s, and the total consumption of 5s after introducing ShardingJDBC</li>
</ul>