In certain cases, several duplicate ads are shown on each page
Submitted By oldschool on 07/11/08
While browsing pages containing providers which are not able to fill their "slot", several duplicate ads are shown from the page preceedig the current one.
Fix required complete redesign of pagination logic for the browse system :-)
Previously, once Safarri determined how many ads each provider would need to show in order to fill the page based on "quantizer" values, Safarri would loop through providers, loading enough ads from each to fill it's "slot" and the slot of all providers following it. If a provider returned no ads for a given filter, no problem - the slots would be filled by the extra ads of the provider proceeding it.
Problem? If a provider couldn't fill it's slot and another provider "filled in" for it, the ads the other provider filled in would be shown in that providers slot on the next page, resulting in duplicate ads being shown to the user. Since grabbing "fill in" ads from a provider would require a completley seperate HTTP request, it was determined to drop the "fill in" functionality.
Now if a provider can't fill it's slot, less ads will be shown on the page. To reflect this change, the "Ads Per Page" quantizer field has been changed to "Page Length", which instead of a hard number is now either short, medium, or long.
Fix required complete redesign of pagination logic for the browse system :-)
Previously, once Safarri determined how many ads each provider would need to show in order to fill the page based on "quantizer" values, Safarri would loop through providers, loading enough ads from each to fill it's "slot" and the slot of all providers following it. If a provider returned no ads for a given filter, no problem - the slots would be filled by the extra ads of the provider proceeding it.
Problem? If a provider couldn't fill it's slot and another provider "filled in" for it, the ads the other provider filled in would be shown in that providers slot on the next page, resulting in duplicate ads being shown to the user. Since grabbing "fill in" ads from a provider would require a completley seperate HTTP request, it was determined to drop the "fill in" functionality.
Now if a provider can't fill it's slot, less ads will be shown on the page. To reflect this change, the "Ads Per Page" quantizer field has been changed to "Page Length", which instead of a hard number is now either short, medium, or long.
Thanks for reporting this!