dandelion / dandelion-datatables

Dandelion component for DataTables
http://dandelion.github.io/components/datatables/
Other
110 stars 49 forks source link

ExtensionLoader introduces huge render delays in large jar scenario #263

Closed mwilmes closed 10 years ago

mwilmes commented 10 years ago

Hello,

I've just upgraded to dandelion-datatables 0.10.x in a shaded jar scenario and it seems that on every table dandelion-datables goes berserk on scanning for extensions. Presumedly due to the size of the shaded jar with lots of own classes + 3rd party classes the implemented scanning takes a lot of time. In my case the scanning takes 4 seconds on each table:

2014-09-09 15:10:04,029 DEBUG | qtp1843803099-95 | c.g.dandelion.datatables.core.extension.ExtensionLoader | Scanning built-in extensions... 
2014-09-09 15:10:08,079 DEBUG | qtp1843803099-95 | c.g.d.datatables.core.generator.WebResourceGenerator    | Transforming configuration to JSON...

Is there any configuration means of enhancing the scan behaviour (like scanning on startup only)?

Thank you in advance,

Best regards,

Michael

tduchateau commented 10 years ago

Hi Michael,

First of all, sorry for the inconvenience. :-(

Indeed, until all Dandelion-Datatables 0.10.x versions, the extension mechanism was based on a set of stinky methods, or at least I'm not very proud of. Starting from the 0.11.0, all extensions (and extension loading) will be based on SPIs. This will drastically improve performance in cases of this kind. And it will also allow to easily extend already existing extensions. See #261

Some work has already been done. See #254.

Regards, Thibault.