Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugdown: Fix patterns ordering in Markdown extension. #2

Closed
wants to merge 1 commit into from

Conversation

kkanahin
Copy link

  • Put 'modal_link' and 'link' inline patterns after avatar inline pattern
    to correct applying them to parsed text.

Fixes: zulip#1654

- Put 'modal_link' and 'link' inline patterns after avatar inline pattern
  to correct applying them to parsed text.

Fixes:  zulip#1654
@timabbott
Copy link
Owner

Can you add a test for this behavior (I guess maybe that just means adding the tests I wrote in zulip#1654)?

@kkanahin
Copy link
Author

@timabbott I've used your branch from zulip#1654 with added test for bugdown and they are passed as you can see.

@timabbott
Copy link
Owner

Oh, I see, I didn't notice your PR was against my repo rather than zulip/zulip.

@timabbott
Copy link
Owner

Merged, thanks @kkanahin!

@timabbott timabbott closed this Oct 20, 2016
timabbott pushed a commit that referenced this pull request Apr 10, 2020
If we had a rule like "max 3 requests in 2 seconds", there was an
inconsistency between is_ratelimited() and get_api_calls_left().
If you had:
request #1 at time 0
request #2 and #3 at some times < 2

Next request, if exactly at time 2, would not get ratelimited, but if
get_api_calls_left was called, it would return 0. This was due to
inconsistency on the boundary - the check in is_ratelimited was
exclusive, while get_api_calls_left uses zcount, which is inclusive.
timabbott pushed a commit that referenced this pull request Aug 3, 2022
These are expensive, and moving them to one explicit call early has
considerable time savings in the critical period:

```
$ hyperfine './manage.py fill_memcached_caches' './manage.py fill_memcached_caches --skip-checks'
Benchmark #1: ./manage.py fill_memcached_caches
  Time (mean ± σ):      5.264 s ±  0.146 s    [User: 4.885 s, System: 0.344 s]
  Range (min … max):    5.119 s …  5.569 s    10 runs

Benchmark #2: ./manage.py fill_memcached_caches --skip-checks
  Time (mean ± σ):      3.090 s ±  0.089 s    [User: 2.853 s, System: 0.214 s]
  Range (min … max):    2.950 s …  3.204 s    10 runs

Summary
  './manage.py fill_memcached_caches --skip-checks' ran
    1.70 ± 0.07 times faster than './manage.py fill_memcached_caches'
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants