Previous Next
How the X-Ref subsystems work

This section uses two tables to describe how the X-Ref subsystems used by SNiFF+ work.
RAM-based and DB-driven cross reference management is contrasted, first in the context of C/C++, then of Java/all other non-C/C++ languages, respectively.
Note that the tables do not describe user interaction, each column simply outlines what SNiFF+ does at each stage. Each table is followed by a summary of the immediate implications.
RAM-based versus DB-driven cross referencing in C/C++
The following table is divided into three rows, each representing a stage in the cross reference management cycle. These stages are

Summary
RAM-based versus DB-driven cross referencing in Java
The following table is divided into two rows, each representing a stage in the cross reference cycle. These stages are
Summary
  • Under the RAM-based system, ref files are written to disk and indexes have to be created and written to disk during Parsing.

  • Under the DB-driven system, no
    ref or index files need be written to disk, but the X- Ref information extracted by the parser has to be interpreted so that the database can handle it, and then the information has to be written to the database.
    Result: When all the X-Ref information has to be generated for large software systems (project setup / forced reparse), the generation time is noticeably longer under the DB- driven system. For incremental updates (after file/project modifications, regular/nightly updates), the generation time differences will generally be negligible.
  • Major differences are apparent in the querying stage.

  • Under the RAM-based system, the index(es) and all necessary
    ref files have to be loaded. Depending on the size of the project and nature of the query (and the what is queried in which order), this can be time and memory consuming.
    Under the DB-driven system, the database is directly queried, resulting in constantly fast queries and negligible additional resource consumption -- regardless of how complex the query.