0

タペストリーを使ったスマートフォン向けWebアプリを開発しています。インデックス ページにループがあります。そのループに 5 つ以上の画像を入れています。各画像サイズは 5KB です。ただし、読み込みには150ms以上かかります(各画像)。

画像の読み込み時間を短縮する方法はありますか。誰か助けてください。

コード:

インデックス.tml

<t:loop source="topRatedVideoDatas" value="videoItemProperty" index="currIndex" encoder="encoder">
<table width="100%" cellpadding="0" cellspacing="0">
<tr class="list">
<td>
<img src="${videoItemProperty.image}"  width="130" />
</td>
</tr>
</table>
</t:loop>

索引.java

public List<ItemProperty> getTopRatedVideoDatas() {
        List<ItemProperty> videoItemProperties = null;
        try {
            final GetData getData = new HttpGetData();
            final String json = getData.getContent("http://localhost:8080/sample/getTopRatedItems" );
            final JSONObject object = new JSONObject(json);
            if(object.optString(Constants.CODE).equalsIgnoreCase(Constants.STATUS_CODE_1)) {
                videoItemProperties = new ArrayList<ItemProperty>();
                final String[] result = object.optString(Constants.ITEMS).split(Constants.COMMA);
                for(int innerIndex = 0; innerIndex < result.length; innerIndex++) {
                    videoItemProperties.add(itemProperties.get(innerIndex).getPropety().get(innerIndex));
                }
            }
        } catch(final Exception e) {

        }
        return videoItemProperties;
    }
4

1 に答える 1