Ticket #464 (closed defect: fixed)
MailNotfier customMesg= implementation uses too much memory
| Reported by: | warner | Owned by: | |
|---|---|---|---|
| Priority: | critical | Milestone: | 0.7.12 |
| Version: | 0.7.10 | Keywords: | web |
| Cc: | nobrowser, daniel@… |
Description
The customMesg= functionality that was recently added to MailNotifier should really be changed to pass a BuildStatus into the renderer function instead of a dictionary with things that were pulled from the BuildStatus. The most significant problem with the dictionary approach is that the code will read every line from every logfile into RAM, then pass them into the renderer (even if the renderer doesn't use them). This could be tens or hundreds of megabytes.
But yeah, it's probably easier for renderer-writers to get a dictionary than to learn how to query the BuildStatus object, so I don't mind too much having that dictionary there. But I'd recommend removing the ['logs'] key from it, and instead pass in a ['build_status'] instance.
Also, I'd not abbreviate the argument name: there's not much benefit to be had from using customMesg= over customMessage=, or better yet message_renderer=.
Change History
comment:2 Changed 4 years ago by dustin
- Milestone changed from undecided to 0.7.11
A *lot* of people are using this functionality, so if we change it, it needs to be for a good reason and to a well-thought-out model. I think this is a good reason. So .. are you going to work on this?
comment:3 Changed 4 years ago by dustin
- Priority changed from minor to critical
- Milestone changed from 0.7.11 to 0.7.12
This really does need to get fixed..
comment:5 Changed 3 years ago by dustin
- Status changed from new to closed
- Resolution set to fixed
commit a901bfd6caf637731a894298fa6e7b6bcc2bb02e
Author: Dustin J. Mitchell <dustin@zmanda.com>
Date: Sat Dec 19 11:45:46 2009 -0600
fixes #464 replace customMesg with messageFormatter
Let's see how that works out.
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)