[LNT] r319118 - We know we are accessing the field changes right away: so preload them
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 27 15:50:11 PST 2017
Author: cmatthews
Date: Mon Nov 27 15:50:11 2017
New Revision: 319118
URL: http://llvm.org/viewvc/llvm-project?rev=319118&view=rev
Log:
We know we are accessing the field changes right away: so preload them
Modified:
lnt/trunk/lnt/server/db/fieldchange.py
Modified: lnt/trunk/lnt/server/db/fieldchange.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/fieldchange.py?rev=319118&r1=319117&r2=319118&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/fieldchange.py (original)
+++ lnt/trunk/lnt/server/db/fieldchange.py Mon Nov 27 15:50:11 2017
@@ -1,5 +1,6 @@
import difflib
import sqlalchemy.sql
+from sqlalchemy.orm import joinedload
from sqlalchemy.orm.exc import ObjectDeletedError
import lnt.server.reporting.analysis
from lnt.testing.util.commands import timed
@@ -198,6 +199,7 @@ def identify_related_changes(session, ts
.join(ts.Regression) \
.filter(or_(ts.Regression.state == RegressionState.DETECTED,
ts.Regression.state == RegressionState.DETECTED_FIXED)) \
+ .options(joinedload(ts.RegressionIndicator.field_change)) \
.all()
for change in active_indicators:
More information about the llvm-commits
mailing list