0

Like most of the pages, my website have multiple banners in a single page.

We have an internal banner system.For calling a banner, a web request is made like

/bannersystem/?page=home&subpage=top&userid=1
/bannersystem/?page=home&subpage=bottom&userid=1
/bannersystem/?page=home&subpage=center&userid=1
/bannersystem/?page=home&subpage=left&userid=1

All these request goes to different(internal) server, which is handled by me.

For optimizing: i planned to call request like

/bannersystem/?page=home&subpage=top,bottom,center,left&userid=1

and from page where its getting called, i will manuplate the resuls. Hence the http requests will go down.

Questions:

  1. Any other approach will be better ?
  2. Should i create a wrapper which accepts request like /bannersystem/?page=home&subpage=top,bottom,center,left&userid=1 and from the wrapper calling the old url internally to avoid code changes
chicharito
  • 1,047
  • 3
  • 12
  • 41

1 Answers1

0

First of all, remember: premature optimization is the root of all evil. Are you sure you need to optimize? Did you measure current performances?

Let's say you did. :)

What kind of optimization? speed? bandwith consumption? both?

Did you enable compression on your banner system to minimize bandwidth consumption and transfer time?

Your approach seems good enough, by doing a unique request instead of four. But you should probably rewrite the code instead of calling the old urls. I don't know, maybe your code is fast enough and you may not need it.

Eric Citaire
  • 4,355
  • 1
  • 29
  • 49