Ticket #1781 (closed defect: fixed)
Partial solution to slow startup (mc-4.7.0-pre4)
Reported by: | 0xe2.0x9a.0x9b | Owned by: | andrew_b |
---|---|---|---|
Priority: | critical | Milestone: | 4.7.0 |
Component: | mc-core | Version: | master |
Keywords: | startup time, UTF8, strcmp | Cc: | |
Blocked By: | Blocking: | ||
Branch state: | Votes for changeset: | committed-master |
Description
This is a patch to improve the startup time of mc-4.7.0-pre4. Please incorporate it into the mainline sources.
Statistics:
- startup time without the patch: 0m0.413s
- startup time with the patch: 0m0.073s
Further improvements can be achieved by optimizing the usage of the glib function involved in UTF8 string comparisons.
Attachments
Change History
comment:1 follow-up: ↓ 2 Changed 15 years ago by 0xe2.0x9a.0x9b
- Priority changed from minor to major
To MC developers: The least you can do is to write back whether you are going to apply the patch or not ...
comment:2 in reply to: ↑ 1 Changed 15 years ago by andrew_b
- Owner set to andrew_b
- Status changed from new to accepted
- Milestone changed from 4.7 to 4.7.0
Replying to 0xe2.0x9a.0x9b:
To MC developers: The least you can do is to write back whether you are going to apply the patch or not ...
Yes. Thank you very much!
But patch would be cleaned up for type accuracy:
- use gboolean instead of int for boolean variables;
- use size_t instead of int for array sizes.
I'll make it myself and create a branch ASAP.
comment:3 Changed 15 years ago by andrew_b
Created 1781_slow_startup branch. Parent branch is master.
changeset:338829a05ea6d6d8d3680a08e41ec53385dc576a
comment:4 Changed 15 years ago by 0xe2.0x9a.0x9b
OK. I wasn't sure whether you are working on some other solution to this problem.
Thanks for the final code cleanup. Though, if I was a purist I would point out that MC's source code is using an "int" for doing iterations such as "for(i=..." ...
comment:5 Changed 15 years ago by angel_il
We planned to use HASH's to make faster algorithm. but not now...
comment:9 Changed 15 years ago by angel_il
- Votes for changeset changed from slavazanko to slavazanko angel_il
- severity changed from on review to approved
comment:10 Changed 15 years ago by andrew_b
- Status changed from accepted to testing
- Votes for changeset changed from slavazanko angel_il to commited-master
- Resolution set to fixed
- severity changed from approved to merged
Merged to master.
changeset:15a21a71cdd9fddb95b5ea76151d76197461966e
comment:12 Changed 15 years ago by andrew_b
- Status changed from closed to reopened
- Votes for changeset commited-master deleted
- Version changed from 4.7.0-pre4 to master
- Resolution fixed deleted
- severity changed from merged to on review
Little ptimization:
- Inline of Keys sort functions.
- Reimplemented key_name_conv_tab_sorted array as array of pointers instead of entire copy of key_name_conv_tab array.
Branch: 1781_little_startup_speedup. Parent branch: master.
changeset:e6851b18b399dc11bb6af130c2a02aa7bcdd8c1b
comment:14 Changed 15 years ago by iNode
- Votes for changeset changed from slavazanko to slavazanko iNode
- severity changed from on review to approved
comment:15 Changed 15 years ago by andrew_b
- Status changed from reopened to closed
- Votes for changeset changed from slavazanko iNode to commited-master
- Resolution set to fixed
- severity changed from approved to merged
Merged to master.
changeset:e6851b18b399dc11bb6af130c2a02aa7bcdd8c1b
comment:16 Changed 15 years ago by andrew_b
- Status changed from closed to reopened
- Votes for changeset commited-master deleted
- severity changed from merged to on review
- Type changed from enhancement to defect
- Priority changed from major to critical
- Resolution fixed deleted
changeset:e6851b18b399dc11bb6af130c2a02aa7bcdd8c1b contains the following bug: array index is out of range in sort_key_name_conv_tab() function.
changeset:1eb149deab750efc0a5f40971c3ff63d6f5fac69 fixes this bug.
Branch: 1781_out_of_bounds. Parent branch: master.
comment:18 Changed 15 years ago by angel_il
- Votes for changeset changed from zaytsev to zaytsev angel_il
comment:19 Changed 15 years ago by styx
- Votes for changeset changed from zaytsev angel_il to zaytsev angel_il styx
- severity changed from on review to approved
comment:20 Changed 15 years ago by andrew_b
- Status changed from reopened to closed
- Votes for changeset changed from zaytsev angel_il styx to commited-master
- Resolution set to fixed
- severity changed from approved to merged
Merged to master.
changeset:92291381e3db9a292ec205c0810f3e0c6b358db0