Permalink
Browse files

bump metacpan_size to 1500 and add comments

  • Loading branch information...
1 parent 241d193 commit ea87487aec6b02eda0d087ce05b608513c42ff52 @timbunce timbunce committed Dec 5, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/Dist/Surveyor.pm
View
@@ -69,7 +69,12 @@ $opt_perlver = version->parse($opt_perlver || $])->numify;
my $major_error_count = 0; # exit status
-my $metacpan_size = 999; # don't make too large, hurts the server
+# We have to limit the number of results when using MetaCPAN::API.
+# We can'r make it too large as it hurts the server (it preallocates)
+# but need to make it large enough for worst case distros (eg eBay-API).
+# TODO: switching to the ElasticSearch module, with cursor support, will
+# probably avoid the need for this. Else we could dynamically adjust.
+my $metacpan_size = 1500;
my $metacpan_calls = 0;
my $metacpan_api ||= MetaCPAN::API->new(
ua_args => [ agent => $0 ],

0 comments on commit ea87487

Please sign in to comment.