widgetti / ipyaggrid

Using ag-Grid in Jupyter notebooks.
MIT License
57 stars 15 forks source link

[Improvement] widget HTML export uses native ag-grid code only #11

Open vincent-grosbois opened 1 year ago

vincent-grosbois commented 1 year ago

This issue is to track a potential improvement on this lib.

Currently, the HTML export of ipyaggrid Grid component is based on the "automatic" export of ipywidget components to HTML ( cf https://ipywidgets.readthedocs.io/en/7.6.3/embedding.html ) . This is fine (in case it works), but possibly the generated HTML/js code is bloated/slow, because it has to embed ipywidget JS dependencies etc. In essence, when we do ipyaggrid HTML export we now have gone full circle, because we have a html/js lib (ag-grid), wrapped in python, wrapped in js, again exported in HTML :D

A possible way to improve this would be to add another HTML export method, where ipyaggrid would manually generate the "pure" ag-grid code, with only dependencies on ag-grid and not on ipywidgets

mariobuikhuizen commented 1 year ago

Thank you for your patience; I apologize for the extended period it has taken for us to address this issue. To help us evaluate the viability and impact of your proposed change, could you please provide some metrics? Specifically:

  1. The difference in size that would result from your proposed change
  2. The impact on load time
  3. An estimate of the code changes required, both in terms of lines of code and complexity

This will help us make an informed decision. Given our limited resources, we'll need to weigh the performance gains against the maintenance and implementation costs. If the benefits are marginal and the effort required is significant, we may have to respectfully decline this proposal. Thank you for your understanding and contribution.