Drastically reduced memory usage, mostly using deduplication.

This commit is contained in:
Šesták Vít
2016-02-26 17:03:41 +01:00
parent d8ca15d367
commit 228456c349
9 changed files with 143 additions and 23 deletions

View File

@@ -12,10 +12,13 @@ object WarningSeverity extends Enumeration {
}
sealed abstract class Warning {
def optimize: Warning
def html: Html
def id: String
def allowSnoozes = true
def severity: WarningSeverity
}
final case class IdentifiedWarning(id: String, html: Html, severity: WarningSeverity) extends Warning
final case class IdentifiedWarning(id: String, html: Html, severity: WarningSeverity) extends Warning{
def optimize = copy(html = Html(html.body))
}