updating static files in google app engine

2019-05-11 03:01发布

I have a welcome page (JSP file) for my application that contains some dynamic content.
e.g. recent posts links, most active categories etc.

To make this work I need to make some data store queries that return these data. this is pretty much unoptimized. especially in the home page and makes its loading time big as compared to hard coding these links in the JSP file.

I am thinking of updating the static JSP file every day with latest data by using a cron task. thus, actually generating a JSP file and replacing the old one. Do you think this is possible? I am also open to any ideas!

thanks;

2条回答
成全新的幸福
2楼-- · 2019-05-11 03:15

This is how the BBC's website has run for many years. Normally the benefit provided by dynamic generation outweighs the cost.

Article discussing relatively recent changes to the BBC news site incorporating dynamic content:

http://paulrobertlloyd.com/2010/09/bbc_news_redesign

查看更多
成全新的幸福
3楼-- · 2019-05-11 03:20

No, you can't do it because on Google App Engine secure sandbox environment an application cannot write to the filesystem.
In order to improve the homepage's performance consider to cache the db results in memcache.

查看更多
登录 后发表回答