Opened 5 years ago

Closed 17 months ago

#9770 closed enhancement (fixed)

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

Reported by: rjollos Owned by: rjollos
Priority: normal Component: PlantUmlMacro
Severity: normal Keywords:
Cc: ebencheung Trac Release: 0.11


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.

Attachments (0)

Change History (7)

comment:1 Changed 5 years ago by rjollos

  • Cc ebencheung added; rjollos removed
  • Owner changed from airadier to rjollos
  • Status changed from new to assigned

comment:2 Changed 5 years ago by rjollos

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

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

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

Added ebencheung as a contributor on the project wiki page.

comment:6 Changed 3 years ago by rjollos

  • Status changed from assigned to new

comment:7 Changed 17 months ago by rjollos

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

Add Comment

Modify Ticket

as closed The owner will remain rjollos.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.