Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
8117cc7d
Commit
8117cc7d
authored
Jan 25, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
6b40eab4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
go/zodb/δtail.go
go/zodb/δtail.go
+2
-1
No files found.
go/zodb/δtail.go
View file @
8117cc7d
...
@@ -61,6 +61,7 @@ type ΔTail struct {
...
@@ -61,6 +61,7 @@ type ΔTail struct {
tailv
[]
δRevEntry
tailv
[]
δRevEntry
lastRevOf
map
[
Oid
]
Tid
// index for LastRevOf queries
lastRevOf
map
[
Oid
]
Tid
// index for LastRevOf queries
// XXX -> lastRevOf = {} oid -> []rev↑ if linear scan in LastRevOf starts to eat cpu
}
}
// δRevEntry represents information of what have been changed in one revision.
// δRevEntry represents information of what have been changed in one revision.
...
@@ -233,7 +234,7 @@ func (δtail *ΔTail) LastRevOf(id Oid, at Tid) (_ Tid, exact bool) {
...
@@ -233,7 +234,7 @@ func (δtail *ΔTail) LastRevOf(id Oid, at Tid) (_ Tid, exact bool) {
}
}
// what's in index is after at - scan tailv back to find appropriate entry
// what's in index is after at - scan tailv back to find appropriate entry
// XXX linear scan -
fix it by: .lastRevOf = {} oid -> []rev↑
// XXX linear scan -
see .lastRevOf comment.
for
i
:=
l
-
1
;
i
>=
0
;
i
--
{
for
i
:=
l
-
1
;
i
>=
0
;
i
--
{
δ
:=
δtail
.
tailv
[
i
]
δ
:=
δtail
.
tailv
[
i
]
if
δ
.
rev
>
at
{
if
δ
.
rev
>
at
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment