focuslight/focuslight — pull request #19 by sonots (2014-02-21 09:30:43+00:00)
Title: Remove subtract

This is the porting from https://github.com/kazeburo/GrowthForecast/pull/50

As I wrote in the GrowthForecast pull request, by removing subtract feature, we can improve the focuslight worker drastically because

1. We can avoid N+1 queries issued
2. We can avoid to have sub DS in RRD files, which results in reducing disk size and disk access to half

In the case of GrowthForecast, I achieved 5x faster improvement to update 60,000 graphs

```
Before: 50 sec
After: 10 sec
```

Please note that, in contrast to GrowthForecast, I completely removed rather than disabled the subtract feature because

1. RRDtool itself supports DERIVE graph which gives the same effect with the subtract graph
2. Removing subtract feature makes codes very simple (We can remove gmode, stype, sulimit, sllimit too)
3. I think backward compatibility is not required for focuslight yet

However, please note that the with this patch, the APIs of focuslight will be imcompatible with GrowthForecast in terms of gmode, stype, sulimit, sllimit parameters since they were removed.
In the case of POST (create, edit), they are simply ignored. In the case of GET, they are not returned.