Ticket #464 (closed defect: fixed)
MailNotfier customMesg= implementation uses too much memory
|Reported by:||warner||Owned by:|
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=.
- Priority changed from minor to critical
- Milestone changed from 0.7.11 to 0.7.12