← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1559279] [NEW] Glance JS API getImage() is inefficient

 

Public bug reported:

The Glance API JS has a getImage() function that calls
'/api/glance/images/' + id, with no trailing slash.  When this hits the
API, it is redirected via a 301 to '/api/glance/images/' + id + '/'
(with a trailing slash).  This adds a second network communication and
thus increases latency.

If the API is just called with a trailing slash, the API responds
directly with the result, which is a bit faster.

You can verify the bug and fix by watching the server in dev mode when
going to the Angular Image Detail page.  You will see a 301 call
immediately followed by another call with the trailing slash.  You can
see this in the JavaScript window as well.

After applying the fix, you should no longer see the 301 result as there
will be no call for the resource without the trailing slash.

** Affects: horizon
     Importance: Undecided
     Assignee: Matt Borland (palecrow)
         Status: In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1559279

Title:
  Glance JS API getImage() is inefficient

Status in OpenStack Dashboard (Horizon):
  In Progress

Bug description:
  The Glance API JS has a getImage() function that calls
  '/api/glance/images/' + id, with no trailing slash.  When this hits
  the API, it is redirected via a 301 to '/api/glance/images/' + id +
  '/' (with a trailing slash).  This adds a second network communication
  and thus increases latency.

  If the API is just called with a trailing slash, the API responds
  directly with the result, which is a bit faster.

  You can verify the bug and fix by watching the server in dev mode when
  going to the Angular Image Detail page.  You will see a 301 call
  immediately followed by another call with the trailing slash.  You can
  see this in the JavaScript window as well.

  After applying the fix, you should no longer see the 301 result as
  there will be no call for the resource without the trailing slash.

To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1559279/+subscriptions


Follow ups