Closed bruth closed 9 years ago
Use of OrderedDict has been removed altogether. These structures take up a lot of memory and have proven to add little value during processing. This required adding a method for getting the header/field data for the values being processed.
I'm wondering whether you meant to say that OrderedDict
was removed from a specific area of the code because it doesn't seem to be removed altogether. See the top 75 lines of avocado/formatters.py
as an example of it still in use. Was this just meant to mean it was removed from the formatter call? Just looking for clarification of the description here, not really any change to the code.
@bruth Looked over the newest changes. Once the build is passing, I'd say this is ready to merge.
Thanks. I re-ran the failed build and it passed this time. I've noticed it can sometimes fail on a cache miss with memcache. Since it's sporadic, I have not taken the time to figure out of why that happens.
A call to formatter(...) was doing a lot of work for every row being processed. The primary slow spots are:
To remediate these issues, targeted format methods are now processed at initialization rather that process time. This requires the list of formats to be passed into the constructor and not in the call method.
Keyword arguments passed in during a call are no longer unpacked in the method call, but are passed as a keyword argument itself,
kwargs
.Use of OrderedDict has been removed altogether. These structures take up a lot of memory and have proven to add little value during processing. This required adding a method for getting the header/field data for the values being processed. This is also a desirable change for addressing
99 and #255.
Logging has been addressed by only doing while in DEBUG mode. Since the exception is skipped, there is no point in logging the errors while in production.
The exporters have been updated to accommodate this changes. In addition, new read methods have been implemented for performance testing including cached and threaded versions. The previous read method have been renamed to manual_read since it performs manual limit and offsetting and distinct checking.
To accommodate the new read method, the
write
on all exporters have been changed to not callread
itself. This change requires the passed iterable to already contain the formatted rows.Note: This refactor requires backwards incompatible changes to get the performance gains.
Signed-off-by: Byron Ruth b@devel.io