git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/3] gitweb: Improving blame_incremental.js

From
Jakub Narebski <jnareb@gmail.com>
Date
May 27, 2011, 13:49 UTC
Message-ID
<1306504201-18014-1-git-send-email-jnareb@gmail.com>

Two first patches remove unnecessary code from JavaScript-side of blame_incremental code. Namely JavaScript is single-threaded (events wait for interpreter), so there is no need for code that tried to handle re-entrancy (concurent access) to blame_incremental.js functions.

So those two are pure simplification.

The third (last) patch replaces setInterval (where events might accumulate if browser is very busy) to recommended re-enabled setTimeout. Thanks to this change we are now able to detect if timer is not necessary, and in that case disable it. This means extra code checking if there is timer to disable (perhaps unnecessary).

This one adds more code than it removes, and could be split into two patches: one simply moving from setInterval to setTimer, second adding those new features.

P.S. Does anybody knows how to test JavaScript part of gitweb code
     _from commandline_ generating TAP-compatibile output to stdout?
Shortlog:
~~~~~~~~~
Jakub Narebski (3):
  gitweb.js: No need for inProgress in blame_incremental.js
  gitweb.js: No need for loop in blame_incremental's handleResponse()
  gitweb.js: use setTimeout rather than setInterval in
    blame_incremental.js
Diffstat:
~~~~~~~~~
 gitweb/static/js/blame_incremental.js |   79 +++++++++++++++++---------------
 1 files changed, 42 insertions(+), 37 deletions(-)
-- 
1.7.5
Next: Jakub Narebski
Message 1 of 5 in “gitweb: Improving blame_incremental.js”
  1. 0/3 gitweb: Improving blame_incremental.jsJakub Narebski, May 27, 2011
  2. 1/3 gitweb.js: No need for inProgress in blame_incremental.jsJakub Narebski, May 27, 2011
  3. 2/3 gitweb.js: No need for loop in blame_incremental's handleResponse()Jakub Narebski, May 27, 2011
  4. 3/3 gitweb.js: use setTimeout rather than setInterval in blame_incremental.jsJakub Narebski, May 27, 2011
  5. Jakub NarebskiMay 27, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.