Katello/runcible — pull request #79 by jlsherrill (2013-07-12 13:47:48+00:00)
Title: Revert "969457: Do not timeout on getting all #rpm_ids"

This reverts commit 4250c138a90ad749b4184e2df9d5a9ca5d472ae6.

when doing a performance investigation within katello's content view definition publish operation
this was discovered to be very slow:

1.9.3-p374 :005 > def timer
1.9.3-p374 :006?> foo = Time.now
1.9.3-p374 :007?> yield
1.9.3-p374 :008?> print Time.now - foo
1.9.3-p374 :009?> end

> Runcible::Extensions::Repository.rpm_ids(Repository.all[3].pulp_id).count
=> 10699
> timer{Runcible::Extensions::Repository.rpm_ids(Repository.all[3].pulp_id)}
45.065503147 => nil
> timer{Runcible::Extensions::Repository.rpm_ids_single(Repository.all[3].pulp_id).count}
3.282162925

These times are very consistent.

The paged method is using ~21 requests and taking 45 seconds, while the single call is taking ~3 seconds. Given that the original purpose was to avoid a timeout when the pulp server is bogged down, I don't believe that this will actually accomplish its goal, as each request is taking ~2 seconds on an unloaded pulp. Given that our timeout is 120 seconds, I don't see this making much a difference on a per request basis. The fact that its making ~20 additional calls could increase the likelihood of a timeout IMHO.