performace is poor, load 120MB, alloc 300MB memory #1226
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#1226
Loading…
Reference in New Issue
Block a user
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?
go version go1.12beta2 darwin/amd64
code
`type (
)
func (m *IsmmgtDirectFlights) LoadFromDb() (num int, err error) {
mysql := MysqlIs()
engine := mysql.Engine
var sli []*IsmmgtDirectFlightDynamic
err = engine.Find(&sli)
}`
go tool pprof
(pprof) peek Find Showing nodes accounting for 508.65MB, 100% of 508.65MB total ----------------------------------------------------------+------------- flat flat% sum% cum cum% calls calls% + context ----------------------------------------------------------+------------- 301.49MB 100% | aaa/xxx/util.(*IsmmgtDirectFlights).LoadFromDb 0 0% 0% 301.49MB 59.27% | github.com/go-xorm/xorm.(*Engine).Find 301.49MB 100% | github.com/go-xorm/xorm.(*Session).Find ----------------------------------------------------------+------------- 301.49MB 100% | github.com/go-xorm/xorm.(*Engine).Find 0 0% 0% 301.49MB 59.27% | github.com/go-xorm/xorm.(*Session).Find 301.49MB 100% | github.com/go-xorm/xorm.(*Session).find ----------------------------------------------------------+------------- 301.49MB 100% | github.com/go-xorm/xorm.(*Session).find 0 0% 0% 301.49MB 59.27% | github.com/go-xorm/xorm.(*Session).noCacheFind 298.89MB 99.14% | github.com/go-xorm/xorm.(*Session).rows2Beans 2.60MB 0.86% | github.com/go-xorm/xorm.(*Session).executeProcessors ----------------------------------------------------------+------------- 162.54MB 100% | github.com/go-xorm/xorm.(*Session).rows2Beans 0 0% 0% 162.54MB 31.96% | github.com/go-xorm/xorm.(*Session).noCacheFind.func1 162.54MB 100% | reflect.New ----------------------------------------------------------+------------- 2.60MB 100% | github.com/go-xorm/xorm.(*Session).rows2Beans.func1 0 0% 0% 2.60MB 0.51% | github.com/go-xorm/xorm.(*Session).noCacheFind.func2 2.60MB 100% | reflect.Append ----------------------------------------------------------+-------------
mysql table is 120MB, when use xorm load this table, it use 300MB, how to impove?