[obs-commits] [openSUSE/open-build-service] 92c993: [api,webui] first try in webui controller
Branch: refs/heads/master Home: https://github.com/openSUSE/open-build-service Commit: 92c9934528171541fcacf5637f9c0dd7f27802cb https://github.com/openSUSE/open-build-service/commit/92c9934528171541fcacf5... Author: Stephan Kulow <coolo@suse.de> Date: 2012-10-11 (Thu, 11 Oct 2012) Changed paths: M src/activexml/transport.rb M src/api/app/controllers/source_controller.rb A src/api/app/controllers/webui_controller.rb M src/api/app/models/db_project.rb M src/api/config/routes.rb M src/api/test/functional/source_controller_test.rb A src/api/test/functional/webui_controller_test.rb M src/webui/app/controllers/project_controller.rb M src/webui/app/helpers/application_helper.rb A src/webui/app/models/api_details.rb M src/webui/app/models/project.rb Log Message: ----------- [api,webui] first try in webui controller The controller in the API serves special JSON routes for the webui to query to avoid several turn arounds between webui and api (always with HTTP and auth overhead) and to avoid creating general XML and then parsing small things out of it This will need some more polishing and also real life testing (my database is pretty small to verify this for real), but in general the idea pays off: old code for project/show: GET /person/coolo? 37.1 +10.0 GET /source/home:coolo:test/_meta? 61.3 +48.0 GET /request?view=collection&states=review&ro... 65.7 +110.0 GET /request?view=collection&states=new&roles... 65.3 +178.0 GET /request?view=collection&states=new%2Crev... 61.6 +244.0 GET /search/project/?match=starts-with%28%40n... 70.8 +307.0 POST /source/home:coolo:test?cmd=showlinked 41.2 +380.0 GET /build/home:coolo:test/_result?view=summa... 80.6 +422.0 new code: GET /person/coolo? 75.6 +13.0 GET /webui/project_infos?project=home%3Acoolo... 41.2 +89.0 -> 333ms saved
participants (1)
-
Stephan Kulow