Optimize Away String Concatenations #22
Labels
No labels
accessibility
backport to lts
bug
code
critical
cygwin
documentation
duplicate
error reporting
external
feature
feedback
good first issue
help wanted
infrastructure
invalid
investigate
language spec
logs
lti
lts only
mac
maybe
qtype:bigbox
qtype:checkoff
qtype:expression
qtype:fileupload
qtype:multiexpression
qtype:multiplechoice
qtype:number
qtype:pythoncode
qtype:pythonic
qtype:pythonliteral
qtype:richtext
qtype:smallbox
question
question types
sandbox
security
syntax highlighting
ui/ux
wontfix
wsl
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
catsoop/catsoop#22
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Even for a small number of small joins, appending to a list and then doing a string join on the list can be a lot faster than doing repeated string concatenation (or maybe we could use
io.TextIOor similar). Since there are a large number of places in the codebase where we do a whole bunch of repeated string concatenations, one "low hanging fruit" for optimization would be to replace those concatenations.It would also be good to do some tests to see if this actually makes a difference in terms of speed of, say, a page load.
This probably actually requires a little bit more investigation. We're super slow on rendering large HTML pages, but it could be any number of things contributing to that (bs4 parsing, excessive string concatenation, etc, etc, etc). It will take a little bit of detective work to figure out what the core issue is. I'm leaving this as
beginner-friendlysince there's a chance that it will be; but there's also a chance that it won't be...fair warning.