Coder Social home page Coder Social logo

Comments (8)

noahcampbell avatar noahcampbell commented on May 19, 2024

How are you measuring the results so I can use as a baseline?

from hugo.

spf13 avatar spf13 commented on May 19, 2024

Rendering my site takes about 3.3 seconds. Then I comment out the transformer logic and set final to content and render the site again and it takes about 400 ms.

Steve Francia
spf13.com
@spf13

On Oct 8, 2013, at 2:28 AM, Noah Campbell [email protected] wrote:

How are you measuring the results so I can use as a baseline?


Reply to this email directly or view it on GitHub.

from hugo.

noahcampbell avatar noahcampbell commented on May 19, 2024

Yikes…that is a dramatic slow down. I'll definitely want to make that faster. The transformer "chain" is currently re-parsing the html tree every time. I will make this is a single operation and then apply all transformers.

What is "set final to content" in your last reply?

from hugo.

spf13 avatar spf13 commented on May 19, 2024

in site.go I did this...

func (s *Site) WritePublic(path string, content io.Reader) (err error) {
s.initTarget()

if s.Config.Verbose {
fmt.Println(path)
}

//if s.Transformer == nil {
//s.Transformer = &transform.Transformer{BaseURL: s.Config.BaseUrl}
//}
//final := new(bytes.Buffer)
//s.Transformer.Apply(content, final)
final := content
return s.Target.Publish(path, final)
}

of course you could just return content instead of final, but I like to
make things easier to undo when debugging.

Steve Francia
http://stevefrancia.com
http://spf13.com
http://twitter.com/spf13

On Tue, Oct 8, 2013 at 12:22 PM, Noah Campbell [email protected]:

Yikes…that is a dramatic slow down. I'll definitely want to make that
faster. The transformer "chain" is currently re-parsing the html tree every
time. I will make this is a single operation and then apply all
transformers.

What is "set final to content" in your last reply?


Reply to this email directly or view it on GitHubhttps://github.com//issues/91#issuecomment-25905069
.

from hugo.

spf13 avatar spf13 commented on May 19, 2024

newer code is faster, but still significantly slower than before. factor of ~4x now.

from hugo.

noahcampbell avatar noahcampbell commented on May 19, 2024

Do you have a baseline in mind?

from hugo.

noahcampbell avatar noahcampbell commented on May 19, 2024

This has a 50% speed up. Reopen if it needs to be faster

from hugo.

github-actions avatar github-actions commented on May 19, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

from hugo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.