Commit graph

12 commits

Author SHA1 Message Date
Douwe Maan
4b027bc93a Add DEBUG_BANZAI_CACHE env var to debug Banzai cache issue. 2016-01-04 14:30:30 +01:00
Yorick Peterse
054df415f9 Optimize CSS expressions produced by Nokogiri
Nokogiri produces inefficient XPath expressions when given CSS
expressions such as "a.gfm". Luckily these expressions can be optimized
quite easily while still achieving the same results.

In the two cases where this optimization is applied the run time has
been reduced from around 170 ms to around 15 ms.
2015-12-31 15:46:47 +01:00
Yorick Peterse
d3951dfaa1 Don't use delegate to delegate trivial methods
Around 300 ms (in total) would be spent in these delegated methods due
to the extra stuff ActiveSupport adds to the compiled methods. Because
these delegations are so simple we can just manually define the methods,
saving around 275 milliseconds.
2015-12-31 15:46:47 +01:00
Yorick Peterse
3077cb52d9 Use XPath for searching link nodes
This is a tad faster than letting Nokogiri figure out whether it should
evaluate the query as CSS or XPath and then actually evaluating it.
2015-12-31 15:46:47 +01:00
Robert Speicher
a97a2d2720 Merge branch 'mention-all' into 'master'
Only allow group/project members to mention `@all`

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/3473

See merge request !2205
2015-12-27 21:09:16 +00:00
Douwe Maan
37993d3957 Escape all the things. 2015-12-24 21:36:33 +01:00
Douwe Maan
672cbbff95 Only allow group/project members to mention @all 2015-12-24 15:33:51 +01:00
Drew Blessing
f177aaa5fa Backport JIRA service 2015-12-18 14:19:48 -06:00
Douwe Maan
d337d5e713 Temporarily disable Markdown caching 2015-12-16 18:50:06 +01:00
Dmitriy Zaporozhets
40104746d6 Merge remote-tracking branch 'origin/feature/update-rubocop' 2015-12-16 13:44:50 +01:00
Douwe Maan
6560d053ed Use lazy reference extractor to get issue's MRs 2015-12-15 16:57:11 +01:00
Douwe Maan
7781bda9bd Move Markdown/reference logic from Gitlab::Markdown to Banzai 2015-12-15 15:51:16 +01:00