Modify

Opened 4 years ago

Closed 3 years ago

#7707 closed enhancement (fixed)

performance impprovement

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

Description (last modified by rjollos)

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 4 years ago by rjollos

  • Description modified (diff)

comment:2 in reply to: ↑ description Changed 4 years ago by jun66j5

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 4 years ago by jun66j5

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

comment:4 Changed 3 years ago by jun66j5

  • Resolution set to fixed
  • Status changed from new to closed

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

[tracwysiwyg]
templates = ticket*.html

Add Comment

Modify Ticket

Action
as closed The owner will remain jun66j5.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.