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.
バージョン3.1から、エンジンはZIPアーカイブ以外にフラットファイルフォーマットをサポートするようになった。ZIPアーカイブはパフォーマンス上の問題点を抱えていた(特にウィジェットメタデータのサポートを開始したバージョン3.0で顕著)ばかりでなく、その他のいくつかの点で問題を引き起こしていた。

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.
この新しいフォーマットは現在のところ圧縮されていないため、このフォーマットでのウィジェットのサイズはZIPフォーマットでのサイズより大きくなっている。しかし、ウィジェットのサイズのほとんどは画像で占められており、画像は通常圧縮フォーマット(PNG,JPG)で用いられるため、全体の増加率はおよそ10%から15%程度にとどまっている。ファイル群を圧縮しないことで、本当は必要でないにもかかわらずすべてのファイルをRAM上に展開するようなことを避けることができる。

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.

ウィジェットがフラットファイルなので、フラットファイルウィジェットからファイルシステム上にファイルを取り出すための新しいAPI(widget.extractFile())を使わない限り、今までウィジェット内にパッケージングしていた(かもしれない)dllのようなファイルを使うことはできない。

Sound files played through the play() function however will work without any changes.
なお、play()関数で再生される音声ファイルは一切の変更を加えることなく正常に動作する。

コメント