From 484c1765ed6de9a87d95605b3500c22bea617db1 Mon Sep 17 00:00:00 2001 From: Chantara Tith Date: Mon, 1 Aug 2016 04:46:09 +0700 Subject: [PATCH] Reduce the calls of external functions to speed up scanning time. --- src/core/lvmdevice.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/lvmdevice.cpp b/src/core/lvmdevice.cpp index 160d02f..8b6c8e1 100644 --- a/src/core/lvmdevice.cpp +++ b/src/core/lvmdevice.cpp @@ -44,12 +44,13 @@ LvmDevice::LvmDevice(const QString& name, const QString& iconname) getTotalPE(name), iconname, Device::LVM_Device) - , m_peSize(getPeSize(name)) - , m_totalPE(getTotalPE(name)) - , m_allocPE(getAllocatedPE(name)) - , m_freePE(getFreePE(name)) - , m_UUID(getUUID(name)) { + m_peSize = logicalSize(); + m_totalPE = totalLogical(); + m_allocPE = getAllocatedPE(name); + m_freePE = totalLogical() - m_allocPE; + m_UUID = getUUID(name); + initPartitions(); }