|
Re: [TBA]: TBATV v4 Development Log
I discovered that App Engine has a feature called "key_names". Instead of having App Engine assign a numeric ID to a Model in the datastore, you can specify a string to use instead. Later, you can call Model.get_by_key_name(key) instead of Model.all().filter('property=', value).get(), which is faster.
We are going to use these for Models with obvious canonical names. For instance, Teams will have key_names like 'frc177', and Events will have key_names like '2010ct'. Matches get key_names like '2010ct_sf2m1'. Since we can guess the key_name for a Model we expect to exist, we can find them faster.
Neat.
|