No, using variables that are not stored should not have any negative impact on object persistence. Even if it did incur some cost, the cost of assigning a value to a member variable at object instantiation time is minuscule compared to the computation resources required to do a data store fetch or write.
On Thu, Nov 12, 2009 at 4:37 PM, dburns <[email protected]> wrote: > Questions related to the db.Model-derived class shown below. > > 1) Would the "not_stored" member variable hurt efficiency of storage > in any way? Its purpose is for temporary work, and it is of course > not persisted to storage. Would its presence slow down storage or > retrieval at all? > 2) Would the mere presence of "update_score" member function hurt > efficiency? > > Having no clue as to how the underlying implementation works, it's > hard for me to judge. Thanks in advance! > > class MyModel(db.Model): > a = db.IntegerProperty() > b = db.IntegerProperty() > score = db.IntegerProperty() > not_stored = 0 > > def update_score(self): > self.score = self.a + self.b > > -- > > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-appengine%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=. > > > -- Ikai Lan Developer Programs Engineer, Google App Engine -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=.
