From: Egon W. <ego...@gm...> - 2010-05-02 18:21:42
|
cc:jmol-developer (following Angel) Hi Angel, Chris, > From: Christoph Steinbeck <ste...@eb...> > We need to be careful with statements about what "should be possible" > until we've done it. :-) True :) > I'm more than happy to finance a little workshop here at the EBI or in > Uppsala to work on a scheme to make the applet very small. I'm happy to come over to the EBI once more. It has been a while. Of course, you (plural) are most welcome in Uppsala too! > Be aware, however, that *always* we rely on modules of the CDK which come in jars > of a given size and determine the size of the load-on-demand-chunks I > mentioned above. Indeed. But with some work, CDK master is increasing modular, and we can now easily work out a custom IChemObjectBuilder with a limited set of IChemObject classes (around IMolecule). This is actually one of the advantages of the new IChemObjectBuilder API, with the single newInstance() method: it no longer has the interfaces hardcoded; the current cdk-interfaces.jar is 28kB already, but by focusing on just the IMolecule, and looking at the jar content, I think that can be reduced by 50%. But, generally, we will have to cherry-pick, but I think the current indexing does this already. The latter should actually take immediate benefit from the new builder, though this might be balanced by the IO classes often offering support for reading into a IChemFile... Bottom line is, reducing the size does require serious design issues in the CDK... I have applied some of them earlier (IChemObject, new LoggingToolFactory), and we can do more. I have also plans to move around the IsotopeFactory, which is a large blog. There are a couple of options there. It requires some serious hacking, but very much possible. Another large part of the 540kB was the RenderingModel, which is now being refactored to be modular (at about 50% or so), which will reduce the size; once we finished doing the same for the ControllerModule, that will be another reduction. Of course, this does not say much about *where* we'll end up, but the size can be reduced. My aim for a simple molecular structure drawing applet would be <100kB, but half the current size would already be quite nice :) Egon -- Post-doc @ Uppsala University Proteochemometrics / Bioclipse Group of Prof. Jarl Wikberg Homepage: http://egonw.github.com/ Blog: http://chem-bla-ics.blogspot.com/ PubList: http://www.citeulike.org/user/egonw/tag/papers |