depwl9992 / anomalyjobs

Automatically exported from code.google.com/p/anomalyjobs
0 stars 0 forks source link

Slow +myjobs with large # of jobs #141

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Jobs listings, including +myjobs, currently do:

@pemit header
@dolist <all jobs>=@pemit <if access, job, else null>
@pemit footer

For cases where there are many more jobs without access than with access, this 
results in a large number of null @pemits and can be slow on some games.

This can be improved by using filter() on the jobs list prior to passing it to 
the @dolist.  This has a side benefit of allowing a check on words() of the 
filter()ed list and emitting "You have no +myjobs" rather than empty headers 
and footers.

Priority is on +myjobs but all the other jobs listings should be considered for 
improvement.

Original issue reported on code.google.com by widdis@gmail.com on 12 Jan 2011 at 6:41

GoogleCodeExporter commented 9 years ago
+myjobs updated in r385.  Leaving the issue open to look over other job 
listings and also check various uses of or() and and() throughout the code 
which could be sped up with cor() and cand().

Original comment by widdis@gmail.com on 12 Jan 2011 at 7:53

GoogleCodeExporter commented 9 years ago
Updated +jobs/select and aliased all other commands to go through that command. 
 Will leave the cor() and cand() stuff alone for now to avoid massive attribute 
updates on the patch.  Can consider that for 7.0 however.

Original comment by widdis@gmail.com on 12 Jan 2011 at 9:35