
4/5/2019 · Fatih Acet
What this post added
This post details the technical improvements made to GitLab's task lists to enhance performance and robustness. The core problem was slow and unreliable updates of task lists with many items, leading to data overwrites and long wait times. The solution involved a frontend modification to send only the clicked task's text and line number to the backend, and a backend change to verify and update only that specific line in the markdown source. This was achieved by using the `SOURCEPOS` flag of the CommonMark renderer to add `data-sourcepos` attributes to HTML, allowing Nokogiri to directly find and toggle the checked attribute in the cached HTML, bypassing full markdown rendering and significantly improving performance. Checkboxes were disabled during the request to prevent concurrent clicks on other tasks.