little optimize
This commit is contained in:
@@ -559,9 +559,6 @@ pub async fn run_deep_memory_clean() -> Result<u64, String> {
|
||||
SetSystemFileCacheSize(usize::MAX, usize::MAX, 0);
|
||||
}
|
||||
|
||||
// 配合普通清理一起执行
|
||||
let _ = run_memory_clean().await;
|
||||
|
||||
let after = get_memory_stats().used;
|
||||
let freed = before.saturating_sub(after);
|
||||
Ok(freed)
|
||||
|
||||
12
src/App.vue
12
src/App.vue
@@ -950,8 +950,8 @@ watch(activeTab, (newTab) => {
|
||||
<section v-else-if="activeTab === 'clean-memory'" class="page-container memory-page-spread">
|
||||
<div class="page-header">
|
||||
<div class="header-info">
|
||||
<h1>内存加速</h1>
|
||||
<p>通过压缩进程工作集,释放物理内存占用。</p>
|
||||
<h1>清理内存</h1>
|
||||
<p>释放内存占用,不影响程序运行。但释放内存后重新打开之前的软件,会感到略微卡顿。</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -994,7 +994,7 @@ watch(activeTab, (newTab) => {
|
||||
<div class="action-card shadow-card" :class="{ cleaning: memoryState.isCleaning }">
|
||||
<div class="action-info">
|
||||
<h3>普通加速</h3>
|
||||
<p>压缩所有进程的内存工作集,释放物理内存,不影响程序运行。</p>
|
||||
<p>建议在需要开启更多软件,但内存占用居高不下时使用。</p>
|
||||
</div>
|
||||
<button class="btn-primary" @click="startMemoryClean(false)" :disabled="memoryState.isCleaning">
|
||||
{{ memoryState.cleaningType === 'fast' ? '清理中...' : '立即加速' }}
|
||||
@@ -1004,7 +1004,7 @@ watch(activeTab, (newTab) => {
|
||||
<div class="action-card shadow-card secondary" :class="{ cleaning: memoryState.isCleaning }">
|
||||
<div class="action-info">
|
||||
<h3>深度加速</h3>
|
||||
<p>强制清空系统备用列表(待机列表),释放更多被缓存的物理空间。</p>
|
||||
<p>可以在长时间使用电脑后,感觉电脑有点卡顿时执行。</p>
|
||||
</div>
|
||||
<button class="btn-secondary" @click="startMemoryClean(true)" :disabled="memoryState.isCleaning">
|
||||
{{ memoryState.cleaningType === 'deep' ? '清理中...' : '深度加速' }}
|
||||
@@ -1821,6 +1821,10 @@ body {
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.action-info {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.action-info h3 {
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
|
||||
Reference in New Issue
Block a user