Modify

Opened 14 years ago

Closed 13 years ago

#7707 closed enhancement (fixed)

performance impprovement

Reported by: anonymous Owned by: Jun Omae
Priority: normal Component: TracWysiwygPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

I would like to not load wysiwys java script to view wiki and others. They don't need wysiwyg.js and avoid loading java script improve performance a bit.

Here is sample for init.py. Please improve it.

    # IRequestFilter#post_process_request
    def post_process_request(self, req, template, data, content_type):
+        if not (req.args.get('action', None)=="edit" or req.path_info.startswith(r'/newticket') or req.path_info.startswith(r'/ticket/')):
+            return (template, data, content_type)
        options = {}
        options['escapeNewlines'] = False

regards,

Takashi Okamoto

Attachments (0)

Change History (4)

comment:1 Changed 14 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 in reply to:  description Changed 14 years ago by Jun Omae

I cannot accept your patch.

tracwysiwyg should inject the WYSIWYG editor into the textarea.wikitexts in all pages. Your patch stops the work dead in admin pages, tracdiscussion pages and the other pages.

I will create a patch that specify template names to enable/disable the WYSIWYG editor in trac.ini. It's configurable.

comment:3 Changed 14 years ago by Jun Omae

If you think that the response of /chrome/tracwysiwyg/*.{js,css} is very slow, try to use mod_cache.

comment:4 Changed 13 years ago by Jun Omae

Resolution: fixed
Status: newclosed

Added [tracwysiwyg] templates option in r11158. If you need the editor for only ticket pages, please configure as the following.

[tracwysiwyg]
templates = ticket*.html

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jun Omae.
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.