mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
perf: cache the format of feeds
Detecting the format of a feed accounts for up to 30% of the time spent in `parser.ParseFeed`. Cache the value once detected, as it'll never change.
This commit is contained in:
parent
e342a4f143
commit
c4a2afb7b7
12 changed files with 58 additions and 11 deletions
|
@ -1015,4 +1015,12 @@ var migrations = []func(tx *sql.Tx, driver string) error{
|
|||
_, err = tx.Exec(sql)
|
||||
return err
|
||||
},
|
||||
func(tx *sql.Tx, _ string) (err error) {
|
||||
sql := `
|
||||
ALTER TABLE feeds ADD COLUMN format text default '';
|
||||
ALTER TABLE feeds ADD COLUMN format_version text default '';
|
||||
`
|
||||
_, err = tx.Exec(sql)
|
||||
return err
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue