About performance
See original GitHub issueMETEOR@1.6.1.1 cultofcoders:grapher@1.3.6
i’ve tested my db and got performance issue.
GroupMembers.addLinks({
group: {
type: 'one',
collection: Groups,
field: 'groupId',
},
user: {
type: 'one',
collection: Users,
field: 'userId',
},
})
const groupmembers = GroupMembers.createQuery({
user: {
username: 1,
},
group: {
name: 1,
},
}).fetch()
I20180625-10:04:58.430(8)? … 6583 more items ] I20180625-10:04:58.430(8)? undefined: 1285.079ms
this is another test by fetch all content and assemble manually
const users = Users.find().fetch()
const groups = Groups.find().fetch()
const usersKeyById = _.keyBy(users, '_id')
const groupsKeyById = _.keyBy(groups, '_id')
const groupmembers = GroupMembers.find().map(gm => ({
user: usersKeyById[gm.userId],
groups: groupsKeyById[gm.groupId],
...gm,
}))
I20180625-10:05:58.910(8)? … 6583 more items ] I20180625-10:05:58.910(8)? undefined: 285.375ms
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
see whether tabs or extensions are slowing down Firefox
Firefox's Task Manager feature shows you performance information, such as what tabs or add-ons are making Firefox slow.
Read more >Performance - Wikipedia
A performance is an act of staging or presenting a play, concert, or other form of entertainment. It is also defined as the...
Read more >The Future of Performance Reviews - Harvard Business Review
Hated by bosses and subordinates alike, traditional performance appraisals have been abandoned by more than a third of U.S. companies.
Read more >What is a Performance Review [Definition] - Quantum Workplace
A performance review is a two-way, individualized conversation between a manager and an employee about performance impact, development, and ...
Read more >Performance Management: Definition, How It Works, and ...
Performance management is a corporate management tool that helps managers to monitor and evaluate employees' work.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@crapthings this has been fixed in 1.3.7. You will do it faster if you do it manually just because you don’t apply filters and the database returns your responses much faster, so it’s not necessarily a Grapher disadvantage. Anyway, I tested for the following:
1000 users 1000 groups Each user has 2 groups, so 2 group memberships per user ~2000
Results using your way: 58ms Results using Grapher: 70ms
This is acceptable if we take into account that it retrieves only the Users and Groups that you need. (In our case all bc the use-case is built that way, but you get it!)
it looks like query was transform into mongo aggregate
https://github.com/cult-of-coders/grapher/issues/188#issuecomment-359643600