MarvinSketch Example - Preload modules in Marvin Sketch

In the following example, you can specify which functionalities should be loaded in the startup period. Here, the reactionquerydrawing functionalities have been sped up. When first use these actions, Marvin does it faster than in other cases where required resources for these functionalities have to be downloaded in real-time. We can do it with the help of the preload parameter.

You can choose from the modules list.

To see the differences between preloaded and not-preloaded modules, background loading of modules are switched off in this example. That's why the bgloadEnabled parameters has been set to false. Disable of background loading means that after startup, other modules that are not required for startup but they may be demanded later are not downloaded automatically in advance in the idle time of the applet.

The menu and toolbars are also customized to use an ISIS/Draw-like configuration in this example. The configuration that is loaded is stored in a .ser file. It is the serialized version of an xml file. In this example this ser file is located under the following (relative) URL: examples/applets/sketch/isisdrawlike-configuration.ser.
See for more details about it in the GUI customization with serialized config file example for more details.

The source of this applet example can be found below:

<script type="text/javascript" SRC="../../../marvin.js"></script>
<script type="text/javascript">
<!--
msketch_begin("../../..", 540, 480);
msketch_param("preload","sketchbackground,reactionquerydrawing,icons");
msketch_param("serializedMenuconfig","examples/applets/sketch/isisdrawlike-configuration.ser");
msketch_param("ttmpls10","*Generic1*chemaxon/marvin/templates/generic.t");
msketch_param("bgloadEnabled",false);
msketch_end();
//-->
</script>