optimize combining links hash generating