Skip to content

Performance improvements #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
m-col opened this issue Apr 5, 2022 · 2 comments
Open

Performance improvements #24

m-col opened this issue Apr 5, 2022 · 2 comments

Comments

@m-col
Copy link
Owner

m-col commented Apr 5, 2022

Performance is pretty terrible currently but can definitely be improved. Things to look at:

  • are lazy types used in all places where they could/should be? Some things may not be needed ever, e.g. if they are not used in templates (specifically thinking about bytestrings)
  • does the code generate any crazy hunks
  • are any unnecessary code paths being traversed all the time
  • getCommits can be improved
  • detect file changes in diffs for new commits and only re-render those files
  • fixupLists and the diff list logic could probably be improved too

gotta profile

@m-col
Copy link
Owner Author

m-col commented Jun 4, 2022

I played around with some different sinks into which ginger rendered data to see what differences are observed. Here are the rough results. The numbers are the seconds it took to render gitserve's and qtile's data using the docs template.

  • IORef: 63 63 64 63 65 63
  • Writer Text: 94 95 152 161
  • Writer TB.Builder: 146 132 132 143
  • State TB.Builder (modify): 81 83
  • State TB.Builder (modify'): 83 79
  • Writer [Text]: 189
  • Writer (DList Text): 121 122 122
  • Writer Html with runReader: 106 100

Pretty interesting. IORef wins out of them all, so unfortunately no obvious improvement to be gained by playing with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant