GAE is slower when used inefficiently. Like any infrastructure, sometimes you need to learn a little about how it works in order to use it effectively. Fortunately, I think there is a slight improvement that will help your code a lot.
fetch() . " " - " " , . fetch(), . , fetch(), , .
fetch() - users stocknames . !
( , 1000 , fetch(1000), , ; ):
userall=user.all().fetch(1000)
stocknamesall=stocknames.all().fetch(1000)
, , AppStats, . ( ) appstats .