Yahoo!WidgetEngineReference-[Flat-File Format]

Flat-File Format

Starting in version 3.1, the engine supports a flat-file format which is not zip. The zip solution not only had performance issues (particularly in 3.0, where we started looking for Widget metadata), but also caused some grief on several other fronts.

This new format is at present not compressed, so the size of a Widget will be larger in this format than in the zip format. However, since images take up most of a Widget's size, the increase is about 10-15% on average since images are normally already in a compressed format (PNG, JPG) whereas the text files are not. The files aren't compressed on purpose — this way we can file-map the file and not have to bring everything into RAM to use it until it's truly needed.

As a result of this new format, Widgets launch much faster in 3.1 than they did in 3.0. To use this new format, you must use the Converter command-line tool. As of this
writing the old "Widget Converter" Widget had not been reworked to use the tool.
この新しいフォーマットを採用した結果、3.1におけるウィジェットの起動速度は3.0に比べてかなり速くなった。新しいフォーマットを使うためには、Converterコマンドラインツールを使う必要がある。このため、古い"Widget Converter"ウィジェットについての記述は更新されていない。

Because your Widget is a flat file, you cannot use items such as dlls that you might have packaged with your Widget unless you use a new API (widget.extractFile()) to
extract the file out of your flat-file Widget into a location in the filesystem.


Sound files played through the play() function however will work without any changes.