HomePhorge

puppetboard/app.py: Optimizing the inventory page

Description

puppetboard/app.py: Optimizing the inventory page

Instead of querying PuppetDB for every fact that it knows about only
querying it for the fact names that it knows about. The result is a
much smaller result set that is more noticable on environments with
large numbers of nodes and/or facts.

On one environment with > 2500 fact-names and 35 nodes a curl test
to the facts endpoint without any query string returned in ~3.5 seconds.
Ran another curl test to the facts endpoint with the query string that
the code in this commit creates, the command finished in ~0.040 seconds.

Details

Provenance
Corey Hammerton <corey.hammerton@gmail.com>Authored on Sep 5 2015, 3:18 AM
vanmeeuwenPushed on Nov 8 2016, 12:42 PM
Parents
rPB1253739bf313: Merge pull request #135 from stoyansbg/master
Branches
Loading...
Tags
Loading...
Build Status
Buildable 5909
Build 6011: Continuous Integration for Software Development Projects