We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello.
wke version 1.02 blink build 98096 build time Sat Aug 5 14:09:29 2023
CPU AMD Rizen 7 1700X
In headless mode, even after opening a web page (quite simple Json), the application continues to use the CPU at the level of 2.5-3%
How to solve this problem? Because your WKE browser from the examples does not consume as much CPU.
I provide an approximate code:
int main(int argc, char **argv) { char cCurrentPath[FILENAME_MAX]; GetCurrentDir(cCurrentPath, sizeof(cCurrentPath)); char dllpath[MAX_PATH]; strcpy(dllpath, (const char *) cCurrentPath); strcat(dllpath, "\\node.dll"); size_t cSize = strlen(dllpath) + 1; wchar_t *wdllpath = (wchar_t *) malloc(sizeof(wchar_t) * cSize); mbstowcs(wdllpath, dllpath, cSize); HMODULE hMod = LoadLibraryW(wdllpath); FN_wkeInitializeEx wkeInitializeExFunc = (FN_wkeInitializeEx) GetProcAddress(hMod, "wkeInitializeEx"); wkeInitializeExFunc((wkeSettings *) 0); WKE_FOR_EACH_DEFINE_FUNCTION(WKE_GET_PTR_ITERATOR0, WKE_GET_PTR_ITERATOR1, WKE_GET_PTR_ITERATOR2, WKE_GET_PTR_ITERATOR3, WKE_GET_PTR_ITERATOR4, WKE_GET_PTR_ITERATOR5, WKE_GET_PTR_ITERATOR6, WKE_GET_PTR_ITERATOR11); free(wdllpath); // set proxy wkeSetProxy(&proxy) wkeWebView webView = wkeCreateWebView(); wkeSetHeadlessEnabled(webView, true); wkeOnLoadUrlBegin(webView, LoadUrlBeginCallback, 0); wkeOnLoadUrlEnd(webView, LoadUrlEndCallback, 0); wkeSetUserAgent(webView, Task_ua); wkeSetLanguage(webView, "en-US"); wkePostURL(webView, "https://httptest.pp.ua/post?=2562228&t=1728567681378", Task_postData, (size_t) strlen(Task_postData)); wkeRunMessageLoop(); } bool LoadUrlBeginCallback(wkeWebView webView, void *param, const utf8 *url, wkeNetJob job) { wkeNetHookRequest(job); wkeNetSetHTTPHeaderField(job, (const wchar_t *) L"accept", (const wchar_t *) L"application/json, text/javascript, /; q=0.01", false); wkeNetSetHTTPHeaderField(job, (const wchar_t *) L"x-requested-with", (const wchar_t *) L"XMLHttpRequest", false); return false; } void LoadUrlEndCallback(wkeWebView webView, void *param, const utf8 *url, wkeNetJob job, void *buf, int len) { printf("%s\n", buf); }
The text was updated successfully, but these errors were encountered:
I'm in the process of upgrading the kernel and the performance will get a big boost then. I'll post a version next week that you can try.
Sorry, something went wrong.
Thank you. I will wait.
Hello. Maybe the problem is not in the kernel? Maybe something wrong with the code?
No branches or pull requests
Hello.
wke version 1.02
blink build 98096
build time Sat Aug 5 14:09:29 2023
CPU AMD Rizen 7 1700X
In headless mode, even after opening a web page (quite simple Json), the application continues to use the CPU at the level of 2.5-3%
How to solve this problem? Because your WKE browser from the examples does not consume as much CPU.
I provide an approximate code:
The text was updated successfully, but these errors were encountered: