diff --git a/src/V3Ast.cpp b/src/V3Ast.cpp index 24c4d0e12..9b406f816 100644 --- a/src/V3Ast.cpp +++ b/src/V3Ast.cpp @@ -1212,7 +1212,11 @@ void AstNode::v3errorEnd(std::ostringstream& str) const { const_cast(this)->dump(nsstr); nsstr << endl; } - m_fileline->v3errorEnd(nsstr, instanceStr()); + // Don't look for instance name when warning is disabled. + // In case of large number of warnings, this can + // take significant amount of time + m_fileline->v3errorEnd(nsstr, + m_fileline->warnIsOff(V3Error::errorCode()) ? "" : instanceStr()); } }