Modify

Opened 12 years ago

Closed 9 years ago

#9770 closed enhancement (fixed)

Write image to file to avoid failure when session size is limited

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: PlantUmlMacro
Severity: normal Keywords:
Cc: ebencheung Trac Release: 0.11

Description

Incorporate the patch by ebencheung. As original noted on the wiki page: created a new branch WriteImgToFile: So it will work when apache's session size is limited, while the origin code will show nothing if you create large or many diagrams on a single wiki page.

https://github.com/ebencheung/TracPlantUmlPlugin/tree/WriteImgToFile

Attachments (0)

Change History (7)

comment:1 Changed 12 years ago by Ryan J Ollos

Cc: ebencheung added; Ryan J Ollos removed
Owner: changed from Álvaro Iradier to Ryan J Ollos
Status: newassigned

comment:2 Changed 12 years ago by Ryan J Ollos

(In [11255]) Refs #9770: Re-implemented the patch by ebencheung, with minor changes. The images are now stored in a cache directory, rather than in the session data. ebencheung had described the issue in which session data was limited by Apache, and the graphs failed to render. Caching files to disk seems like a better approach and this is similar to how GraphvizPlugin works. Some code review will be done in the future to compare this implementation with that of the GraphvizPlugin.

Minor changes from the original patch are:

  • The cache directory can be specified in trac.ini. The default is $TRACENV/cache/plantuml.
  • A _read_img_from_file method was added.
  • Minor coding style changes.

The biggest concern I have with this implementation is that the cache directory is never cleaned. I'm not sure of the best way to handle this, but as a first step I'll take a look at if/how the GraphvizPlugin handles this issue.

comment:3 Changed 12 years ago by Ryan J Ollos

(In [11256]) Refs #9770: As noted in #3951, an option for the cache directory is probably overkill, so it has been removed. It will be reimplemented if someone provides a reasonable use-case.

Genshi is now used to build the html that is returned by the macro.

comment:4 Changed 12 years ago by Ryan J Ollos

GraphvizPlugin has a _clean_cache method that says like it cleans up the cache based on file access time. Something similar should be implemented here.

comment:5 Changed 12 years ago by Ryan J Ollos

Added ebencheung as a contributor on the project wiki page.

comment:6 Changed 11 years ago by Ryan J Ollos

Status: assignednew

comment:7 Changed 9 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

Modify Ticket

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