Skip to content
Snippets Groups Projects
Commit 22772871 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Merge branch 'note-background-job' into 'master'

Background process note logic for #3948

Quick and dirty way to get *most* of the note processing out of band and into the background. Seeing some pretty nice speed bumps. Keep in mind that doing this in process results in slower and slower responses as more notes are added and more participants exist.

```
without background processing
  Completed 200 OK in 627ms (Views: 0.5ms | ActiveRecord: 32.3ms)
  Completed 200 OK in 478ms (Views: 0.8ms | ActiveRecord: 28.3ms)
  Completed 200 OK in 1107ms (Views: 0.6ms | ActiveRecord: 36.6ms)

with background processing
  Completed 200 OK in 108ms (Views: 0.6ms | ActiveRecord: 4.7ms)
  Completed 200 OK in 78ms (Views: 0.5ms | ActiveRecord: 4.5ms)
  Completed 200 OK in 164ms (Views: 0.5ms | ActiveRecord: 8.3ms)
```

As you can see, speeds are consistent when doing the harder work out of process. I'm not sure the number of sql queries we're saving, but based on the logs alone it's a pretty good amount.

@dzaporozhets @yorickpeterse I would love some input on this.

See merge request !2631
parents e221990e f3d4f2ea
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment