Skip to content

Commit

Permalink
fix: don't hash content, it takes too much time
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Feb 1, 2020
1 parent eab68aa commit ac35795
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/resolver/cache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
ResolverCacheInternal,
ResolvedTimeline
} from '../api/api'
import * as crypto from 'crypto'
import * as _ from 'underscore'

export function initializeCache (cacheOrg: ResolverCache, resolvedTimeline: ResolvedTimeline): ResolverCacheInternal {
Expand All @@ -28,15 +27,8 @@ export function objectHash (obj: ResolvedTimelineObject): string {
obj.classes ? obj.classes.join('.') : '',
obj.layer + ''
]

return crypto.createHash('md5').update(thingsThatMatter.join(',')).digest('hex')
return thingsThatMatter.join(',')
}
export function getObjectReferences (obj: ResolvedTimelineObject) {
return obj.resolved.directReferences

// const references: string[] = []
// _.each(obj.resolved.instances, instance => {
// instance.references.forEach(ref => references.push(ref))
// })
// return references
}

0 comments on commit ac35795

Please sign in to comment.