#3193 Make configurable the size of files above which syntax highlighting is dropped
Merged by pingou. Opened by pingou.
config_diff  into  master

Download 3193.patch

Fixes https://pagure.io/pagure/issue/3191

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

1 new commit added

  • Some consistency in our white lines

rebased onto 2814d60de3ff555e6a5665a2e2fe81fb54027138

rebased onto 819b898c4a3fbfde14bb31542251fc01438a94dd

Is it possible to insert a link to the service that does the highlight? Maybe to its stats as well?

I don't quite understand your questions. What service? What stats? Pagure itself does the highlighting via the pygments python library and we faced a few out of memory error that we tracked down to this.

I see. So there is no webservice to process highlighting - everything (library load, parse and output) happens in the same thread and Python as main application. Synchronously. I expected syntax highlighting to be a separate server with caching, stats etc.

That is correct, it is all "live" :)

Should I create an issue to have syntax highlighter as a separate (caching) microservice? :D Then Pagure will have to use some service orchestration tool like Kubernetes, which will complicate things a little. ) Or maybe infrastructure team already uses something?

Should I create an issue to have syntax highlighter as a separate (caching) microservice? :D Then Pagure will have to use some service orchestration tool like Kubernetes, which will complicate things a little. ) Or maybe infrastructure team already uses something?

You can create the ticket but remember that cache invalidation is among the hardest things to do, so that will make this less of a priority for pagure.
And pagure already has async processes running (CI, webhook, the different workers interacting with the different git repos...), so that part of the architecture already exists.

But this PR itself could still use a review :)

Is the size in bytes? Maybe this should be explicitly stated?

Change looks good to me :thumbsup:

It's the number of characters, I'll make this explicit, thanks

rebased onto 4a7dd62054358df93a5f47f3c5abde2a2f299c4a

:thumbsup:

thanks :)

Pull-Request has been merged by pingou

Metadata