# Smarter CI with Django

**URL:** <https://forum.djangoproject.com/t/smarter-ci-with-django/38374>\
**Category:** Using Django\
**Created:** [January 30, 2025, 9:00am UTC](https://forum.djangoproject.com/t/smarter-ci-with-django/38374 "2025-01-30T09:00:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mrchrisadams](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/mrchrisadams/32/1904_2.png) [@mrchrisadams](https://forum.djangoproject.com/u/mrchrisadams)\
**Post date:** [January 30, 2025, 9:00am UTC](https://forum.djangoproject.com/t/smarter-ci-with-django/38374/1 "2025-01-30T09:00:01Z")

</div>

I’m starting this thread here, prompted by @carltongibson mentioning it in this thread about a formatter for CSS and JS in Django:

> [@Adding a formatter for CSS & JS](https://forum.djangoproject.com/t/adding-a-formatter-for-css-js/25754):
>
> I was talking to @thibaudcolas and he mentioned the idea of adding formatting for CSS and JS, as well as linting for CSS. I think the easier sell here is the formatter, so I’ll propose that here. For motivation, I find myself fairly often in the admin CSS (especially lately) and it’s reasonably laid out for the most part, but there are things that are a little off. Sometimes the indentation is different from the rest of the file, for example. The JS is in a bit worse shape I think, some of the …

There was an aside about clever things you can do to reduce time in CI, that has been pioneered by the folks at Mozilla working on the Firefox browser.

I’ll share the quote from Carlton, which was quoting an earlier convo between us before about optimising CI time:

> > The best example I know in the public domain is the work Mozilla did when they looked at recoding the time spent in CI on their machine,
> > 
> > [Testing Firefox more efficiently with machine learning - Mozilla Hacks - the Web developer blog](https://hacks.mozilla.org/2020/07/testing-firefox-more-efficiently-with-machine-learning/)
> > 
> > Mozilla found something like a 99% percent saving in CI time, when they started using a model to see which tests it might make sense to run when a new patch was introduced. Here’s a choice quote about the approach they have been taking and the newer approach they were experimenting with in 2020:

His response:

> That _“something like a 99% percent saving in CI time”_ result is frankly eye-watering. **A 99% percent saving** — if we could get even some of that. 🤩

I’ve started this thread to dump some links and notes, as it’s a thing I’ve been looking into more of late.

More to come later.
