meteor - When should I create another publication, performance-wise? -
i have 1 publication 10 fields first template.
i have template need 5 fields of same publication. since user can access both, depending on loaded template, security out of concern.
the question:
performance-wise, should make publication 5 fields need, or should rely on first publication?
i expect trade-off between:
- the amount of data sent
- the server side load (each of these publications use
cursor.observe()) - the number of users subscribing (the mergebox load)
another solution create 2 publication: basic 5 field , 1 5 other fields. in first template, subscribe both, in second subscribe first only.
i understand theory, can't infer best approach. expect there practices in these kind of cases.
all equivalent too, , make unnecessary micro-optimization (and answer question).
thanks!
i think have right thought process , it's hard if should optimize or later. suggest doing if it's not taking time.
for case have lot of users, want app track minimal amount of database fields possible. think approach 2 subscriptions good. 1 thing suggest reducing amount of subscriptions first template having publication has 10 fields, doesn't have subscribe twice.
hope helps!
Comments
Post a Comment