Modify

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#12265 closed defect (fixed)

AJAX call for getting commits should be asynchronous to prevent freezing page (fix included)

Reported by: Cinc Owned by: Cinc
Priority: normal Component: TracTicketChangelogPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

With our current setup the query call to get the changelog is very slow. It may need up to 20 seconds which is related to network, database and SVN config which can't be changed. During this time span the ticket page is frozen.

The cause for this is the setup of the AJAX call in /0.12/ticketlog/htdocs/ticketlog.js where for some reason the async flag is set to false.

After setting this to true the ticket page remains usable while in the background the changelog is loaded.

    $.ajax({
	        type: 'POST',
	        url: base_url + "/ticketlog/query",
	        data: JSON.stringify(data),
	        contentType: "application/json",
	        cache: false,
	        async: false, <------------- should be 'true'
	        dataType: 'json',
	        success: onQuerySuccess,
	        error: onQueryError
	    });

Attachments (0)

Change History (3)

comment:1 Changed 10 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 14528:

0.2dev: Use async request. Fixes #12265.

Untested patch by Cinc.

comment:2 Changed 10 years ago by Ryan J Ollos

Owner: changed from Richard Liao to Cinc

comment:3 Changed 10 years ago by Cinc

I successfully tested the updated plugin [14528] with Trac 0.12.3.

Thanks for applying the fix.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Cinc.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.