Coder Social home page Coder Social logo

Comments (3)

David-Maisonave avatar David-Maisonave commented on June 24, 2024

Associated update complete

from nppexec.

d0vgan avatar d0vgan commented on June 24, 2024

There were a lot of changes in NppExec during this month, and I believe now the plugin is in a release candidate state.
The built-in RegExp-based filter for compiler error messages is disabled by default to avoid an impact on performance.
It is recommended to enable this filter locally, right before running a compiler or an interpreter: "npe_console local -- x+".

Do you have any changes to the regular expressions used by this filter?

from nppexec.

d0vgan avatar d0vgan commented on June 24, 2024

By the way, I've made some performance tests to understand why the all-in-one compilation script (that you initially created) requires noticeable time to be executed.
The short answer is: use npe_console - to disable the output and to make it very fast.
The longer answer is: the CScriptEngine itself is fast enough, but the Rich Edit control (responsible for all the text in NppExec's Console) is sooooo slooooooow...
Here is a simple example. Consider the following NppExec's script:

npp_console ?
npp_console -
npe_console local m+
:1
goto 1

If you execute it as is, it is lightning-fast, it shows "GOTO was performed more than 10000 times" almost immediately. This is the performance of the CScriptEngine itself.

Now, let's close NppExec's Console and modify this script:

npp_console ?
//npp_console -
npe_console local m+
:1
goto 1

This second version prints "GOTO: 1" to a hidden RichEdit window 10000 times. You might think that a hidden RichEdit window should not take much time to repaint itself while adding these lines, but in reality this version takes much longer than the previous one! This is the performance of the CScriptEngine plus Rich Edit control.

I also did some profiling using Visual Studio - and most of the time is indeed spent within the Rich Edit control!
Here is the profiling statistics:

Function Name                                               Total CPU [unit, %]  Self CPU [unit, %]  Module
| - ConsoleDlg::RichEditWndProc                              4556 (44,06%)       24 (0,23%)          NppExec.dll
| - CNppExecCommandExecutor::BackgroundExecuteThreadFunc     1538 (14,87%)       0 (0,00%)           NppExec.dll
| - CNppExecCommandExecutor::ExpirableCommand::Execute       1538 (14,87%)       0 (0,00%)           NppExec.dll
| - CNppExecCommandExecutor::OnDoExecDlgCommand::subExecute  1533 (14,83%)       0 (0,00%)           NppExec.dll
| - CNppExecCommandExecutor::ScriptableCommand::OnDoExecDlg  1533 (14,83%)       0 (0,00%)           NppExec.dll
| - CNppExecCommandExecutor::RunScriptEngine                 1490 (14,41%)       0 (0,00%)           NppExec.dll

from nppexec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.