Text this: Algorithm for faster computation of non-zero graph based invariants