Static File Questions

8 views
Skip to first unread message

MajorProgamming

unread,
Jan 8, 2009, 5:59:06 PM1/8/09
to Google App Engine
Just a few questions on static files:

1. Does serving a static file cost CPU usage?

2. Does having a large number of static files (let's say like 700)
have _any_ effect on performance of page serving [similarly, does
having a lot of mappings affect performance]?

3. When a python script reads a file off the app's filesystem (like a
template html file), is that any faster than a get_by_key on the
datastore? [i.e. filesystem vs. bigtable performance]?

4. Will the paid version of Google App Engine allow over 1000 files
and/or larger than 1MB files (or entities)?

Thanks,

N. Rosencrantz

unread,
Jan 9, 2009, 3:26:42 AM1/9/09
to Google App Engine
Reversibly breaking and remaking larger than 1MB files persistently
storing max 1 MB chunks, gae http get and post support the larger. The
gae http transport as it is handles larger files. The 1MB limit only
limits the entities, not the transport.

MajorProgamming

unread,
Jan 9, 2009, 2:36:34 PM1/9/09
to Google App Engine
I'm not sure I understand you. Which question # were you trying to
answer?

N. Rosencrantz

unread,
Jan 9, 2009, 4:34:13 PM1/9/09
to Google App Engine
example: upload a 2 MB file through a html form, split it serverside
into 2 or 3 parts, then store the parts as blobs of max 1 MB each.
It's inconvenient yet a method to serve large files with no difference
towards the client.

MajorProgamming

unread,
Jan 23, 2009, 2:03:48 PM1/23/09
to Google App Engine
I don't mean when the user uploads files. I mean when I do (i.e.
through appcfg.py). Does it hurt performance if GAE has like 700
static files from me...?

James Ashley

unread,
Jan 25, 2009, 12:22:47 AM1/25/09
to Google App Engine


On Jan 9, 3:34 pm, niklasr <nikla...@gmail.com> wrote:
> example: upload a 2 MB file through a html form, split it serverside
> into 2 or 3 parts, then store the parts as blobs of max 1 MB each.
> It's inconvenient yet a method to serve large files with no difference
> towards the client.

Is this a new development? Last I checked, a request > 1MB would just
fail. It seems like streaming BLOBs like this might work, if you're
clever enough, but...

Has this been cleared up and I missed it? (Entirely possible, and
desirable, of course)

Regards,
James

N. Rosencrantz

unread,
Jan 25, 2009, 7:36:02 AM1/25/09
to Google App Engine


On Jan 25, 6:22 am, James Ashley <james.ash...@gmail.com> wrote:
> On Jan 9, 3:34 pm, niklasr <nikla...@gmail.com> wrote:
>
> > example: upload a 2 MB file through a html form, split it serverside
> > into 2 or 3 parts, then store the parts as blobs of max 1 MB each.
> > It's inconvenient yet a method to serve large files with no difference
> > towards the client.
>
> Is this a new development?  Last I checked, a request > 1MB would just
> fail.

It's probably been possible since gae start, only too complicated.
Requests > 1MB from html upload form are read:

file = self.request.POST.get('file').file.read()
len = file.__len__()

or in MB

len = file.__len__()/(1024.0*1024.0)

With above code I can determine filesizes > 1 MB. Then storing and
serving the larger files requires partitioning at max 1 MB.

best regards
Niklas
Reply all
Reply to author
Forward
0 new messages