The ThemeManager is designed with a production system in mind, not with development. In production it would be far slower to physically load each template off the disk over and over again, especially considering the templates wouldn't likely be changing.

If you are a code developer you can relatively easy provide an alternate Theme implementation which loads the files from disk and doesn't cache them.

Or, what is probably the easiest thing to do is to develop new themes directly in the db rather than on disk and once they are ready you copy them to disk and package them. I know this isn't ideal, but it's as far as the theme management was developed.

-- Allen


Alex Florentino wrote:
Hi all,

I think that did find  a problem at roller I was working at
ThemeManagerImpl.java :

    public void initialize() throws InitializationException {

        log.debug("Initializing Theme Manager");

        if(themeDir != null) {
            // rather than be lazy we are going to load all themes from
            // the disk preemptively and cache them
            this.themes = loadAllThemesFromDisk();

            log.info("Loaded "+this.themes.size()+" themes from disk.");
        }
    }

but the this.themes = loadAllThemesFromDisk();
would verify if  the cache.sitewide.enabled is true because otherwise for
development new theme(site front) I need always restart tomcat,
it is very bad.



thanks

Reply via email to