Ticket #1781 (closed defect: fixed)

Opened 7 years ago

Last modified 6 years ago

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

mc-4.7.0-pre4-slowStart.patch (5.0 KB) - added by 0xe2.0x9a.0x9b 7 years ago.

Change History

Changed 7 years ago by 0xe2.0x9a.0x9b

comment:1 follow-up: ↓ 2 Changed 7 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 7 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • 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 7 years ago by andrew_b

Created 1781_slow_startup branch. Parent branch is master.
changeset:338829a05ea6d6d8d3680a08e41ec53385dc576a

comment:4 Changed 7 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 7 years ago by angel_il

We planned to use HASH's to make faster algorithm. but not now...

comment:6 Changed 7 years ago by angel_il

to ⚛: and thank you for your time.

comment:7 Changed 6 years ago by andrew_b

  • severity changed from no branch to on review

comment:8 Changed 6 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:9 Changed 6 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 6 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

comment:11 Changed 6 years ago by andrew_b

  • Status changed from testing to closed

comment:12 Changed 6 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:13 Changed 6 years ago by slavazanko

  • Votes for changeset set to slavazanko

comment:14 Changed 6 years ago by iNode

  • Votes for changeset changed from slavazanko to slavazanko iNode
  • severity changed from on review to approved

comment:15 Changed 6 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

comment:16 Changed 6 years ago by andrew_b

  • Status changed from closed to reopened
  • Votes for changeset commited-master deleted
  • severity changed from merged to on review
  • Resolution fixed deleted
  • Priority changed from major to critical
  • Type changed from enhancement to defect

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:17 Changed 6 years ago by zaytsev

  • Votes for changeset set to zaytsev

comment:18 Changed 6 years ago by angel_il

  • Votes for changeset changed from zaytsev to zaytsev angel_il

comment:19 Changed 6 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 6 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
Note: See TracTickets for help on using tickets.