[vala/parallel: 17/17] codegen: skip visiting fast-vapis



commit 7f8e379878df4b0108f1f10437e8f12f176e1625
Author: Ryan Lortie <desrt desrt ca>
Date:   Sat Aug 28 19:39:26 2010 +0200

    codegen: skip visiting fast-vapis
    
    Skip visiting fast-vapis in the code generator when not writing a header
    file.  For builds with a very large number of fast-vapi files this can
    reduce compile time by more than 50%.

 codegen/valaccodebasemodule.vala |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index 7bc7149..0550132 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -417,7 +417,8 @@ public class Vala.CCodeBaseModule : CodeGenerator {
 		/* we're only interested in non-pkg source files */
 		var source_files = context.get_source_files ();
 		foreach (SourceFile file in source_files) {
-			if (file.file_type != SourceFileType.PACKAGE) {
+			if (file.file_type == SourceFileType.SOURCE ||
+			    (context.header_filename != null && file.file_type == SourceFileType.FAST)) {
 				file.accept (this);
 			}
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]