search

Home  >  Q&A  >  body text

python - 如何让电脑变卡?

我是windows桌面软件的开发者,我发现了一个问题,如果windows几天不关机,在运行一些软件,会有些慢,即使用了清理释放的相关软件,也没很大作用。重启后即可消失。所以我想在开机的时候进入这种变慢环境,进行优化调试。

PHP中文网PHP中文网2807 days ago1306

reply all(12)I'll reply

  • 天蓬老师

    天蓬老师2017-04-17 17:37:35

    You are all wrong! ! ! ! ! ! ! !

    To tell the truth, just install it

    1.Baidu Family Bucket*
    2.Tencent Computer Manager
    3.360 Security Guard

    啧啧 Then restart the computer and enjoy the feeling of lag

    *Minors are not allowed to imitate. We will not be responsible for any unintended consequences


    233 Someone stepped on it. Do you think Baidu can speed up

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:37:35

    while True:
        pass

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 17:37:35

    "use strict";
    const os = require("os");
    const restMemory = 0.1;
    let largeBuffer = [];
    while (true) {
        if (parseFloat(os.freemem() / os.totalmem()) > restMemory) {
            largeBuffer.push(new Buffer(1024));
        } else {
            continue;
        }
    }

    Written a piece of code specifically for you, nodejs可以瞬间让你的内存剩余到你指定的restMemorythe location of the value. It will get stuck when it is very small, so use it with caution.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 17:37:35

    First of all, I have a nine-year-old computer at home, and extreme performance tests can be run on that computer~~~

    Okay, back to the topic, if you just want to test on a low-performance platform and need to occupy the CPU, just write for(;;) and run a few more times; if you want to occupy the hard disk, just copy a large amount Just run it when downloading the file (using Baidu Cloud to download has the same effect).

    If you must be in a state where Windows is slowing down, you can install a virtual machine to run Windows. When you feel that it has reached the "slow state", take a snapshot of the virtual machine; in the future, you only need to The virtual machine can be restored to this snapshot just fine. Moreover, the virtual machine can also control the CPU computing power, memory size, hard disk specifications, network connection speed and packet loss rate, which is very convenient.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 17:37:35

    The reason why software runs slowly is because a lot of memory occupied cannot be released, so if the memory is occupied crazily and then the memory is released, some of the memory cannot be released without shutting down~~~

    reply
    0
  • PHPz

    PHPz2017-04-17 17:37:35

    To provide an idea, you can write a script to start all the software when you turn on the computer. Or even simpler, use existing tools to start all software. . . Otherwise it will be an endless cycle~~~

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 17:37:35

    procexp to see how the computer is running

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 17:37:35

    Apply a few pieces of large memory to force the system to swap out most of the memory to the swap area, and then you can enjoy the pleasure of constantly changing pages

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 17:37:35

    As long as the user is a windows computer, you are guaranteed to find a satisfactory situation

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 17:37:35

    Start up and run all software

    reply
    0
  • Cancelreply