Why WebKit using Cairo is very slow on windows? - webkit

I compiled WebKit based on WinCairo on windows. The built executable is quite slow in rendering. I built it using the following command line
perl WebKit/Tools/Scripts/build-webkit --wincairo --release --no-experimental-features --cmakeargs="-DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl"
Why resulting executable is slow in rendering? If I select a paragraph on a website then delay is easily felt.
Is it expected to be slow?

Related

wkhtmltopdf goes extremely slow on different environment

I am developing a PHP web application with CakePHP 3.4 framework, and i am using wkhtmltopdf 0.12.4 to output dynamic content in a .pdf file. Currently i'm using three different environments where i develop and test my application:
In my local environment (XAMPP 32-bit for Windows), wkhtmltopdf works great. It takes ~1 second in rendering .pdf files
In a remote testing environment (CentOS 7 64-bit using apache2, 4GB memory), works great too.
In my third remote testing environment (Another CentOS 7 64-bit distro with similar CPU specs as the second one and 4GB memory), wkhtmltopdf takes up to 20 seconds in rendering the same .pdf file
What could be causing this behavior in the third environment? How can i monitor or debug wkhtmltopdf process to help me identify why .pdf rendering is so slow?
Remove rgba and set border-radius to 1px in your CSS files (or completely remove them if they are not needed). That should speed up the PDF generation process.
Similar issue
Another reson can be your current default printer on windows. See:
https://github.com/wkhtmltopdf/wkhtmltopdf/issues/4891
If you use a standard printer that is
a network printer
you use the windows default driver for that printer and have not installed the manufactors printer driver
-> wkhtmltopdf is really slow

How to cross-compile the WebKit Gtk for ARM?

I want to cross-compile the WebKit Gtk(recent revision 174059) for ARM architecture.
I searched the way for it in official web site(trac.webkit.org/wiki/BuildingGtk) and google search, but i couldn't find the way.
I'm using Ubuntu 14.04 LTS and already built WebKit Gtk in x86 architecture successfulă…Ły .
so I considered using the cross-compile tools like 'scratchbox', but it was very complex jobs and didn't work well. because Webkit needs many uninstalled libraries and it's build system also uses 'jhbuild'.
is there any simple way to cross-compile WebKit Gtk for ARM?
I'm no sure about cross compile, but you can try qEMU emulator of ARM CPU and up&run Stretch armhf release of Debian.
PS
Unfortunately qEMU is unbearable slow, so it will require a HUGE amount of time to install all dependancies and build WebKit.
In my case I've bought used ChromeBook with ARM and run there Debian over crouton, it saved me a lot of time to build WebKit GTK+

LibreOffice 4.3 does not convert to PDF (command line), but no errors reported

We are running Fedora on a dedicated server:
Linux host.**obscured**.<tld> 2.6.18-348.6.1.el5 #1 SMP Tue May 21
15:29:55 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux
One important aspect of our web application is the ability to upload all types of documents, such as Open Office or Microsoft, and convert them dynamically to PDF, so they can be displayed on the site, and also using a JPG thumbnail created from the PDF asset.
Until recently, this function worked great, using LibreOffice 4.0. We used the soffice binary to dynamically convert uploaded files in a background shell command.
Then suddenly, LibreOffice stopped working, and we could not restore it, so we downloaded and installed LibreOffice 4.3.
The program now works, in the sense that it no longer bombs when forking off a the process, but the conversion no longer works, and doesn't produce any output or errors:
We essentially use the same syntax as from LibreOffice 4.0, which used to work correctly:
/opt/libreoffice4.3/program/soffice --headless --convert-to pdf --nofirststartwizard
--outdir **obscured** --nofirststartwizard **obscured**.docx
(I have obscured certain information here, intentionally, for the privacy of our users)
Again, this same syntax used to work with LibreOffice 4.0, until it broke, presumably due to an update of Java JRE on the server (we're not 100% sure...)
I cross-checked the syntax against online resources.
There was also mention of not being able to convert when another LibreOffice instance is running, and I checked that this was the only process!
Any thoughts or ideas will be appreciated, as this function is an important part of the application user experience
I have the same problem, after I 've used strace , I could see that fonts are missing.
http://ask.libreoffice.org/en/question/30069/pdf-font-embedding-in-libreoffice-42/

running .net(mono) application in both linux and windows

I have created a c# application in ubuntu using monodevelop. It is running well in ubuntu.
I tried to run that application(firstgtk.exe file created after running in ubuntu)in windows.But it showing error message.How can i make to portable in both linux and windows?
The error message is:
when i click the firstgtk.exe file, a command prompt has come.It is blank. At the same moment microsoft message(send Error report or don't send):
firstgtk has encountered a problem and needs to close.
When i click don't send button, command prompt and message box are gone.
Mono compiles down to CIL code and is completely portable to .NET or Mono on other platforms. I can compile my C# code on a Mac and run the resulting EXE on Linux or Windows under either .NET or Mono.
Without the actual error message we can only guess the issue here. That said, in my experience, the most common reasons an application written in Mono on Linux/UNIX would create an error on Windows are pathnames with platform specific path separators or case sensitivity issues. The Windows file system is not case sensitive but they are on Linux/UNIX.
Another possibility is that you are using Mono on one platform and trying to run it on .NET on the other. Mono ships with a number of libraries that are not present in .NET on Windows.
Actually, I guess a final possibility is that GTK# is a common way to produce GUI code on Mono. GTK# relies on the GTK+ C library being present which is very common on Linux but unlikely on Windows unless it has been explicitly installed.
We really need to know what the error message was.
If you're using Gtk#, your app is portable between Windows and Linux. My guess is that you don't have Gtk# installed correctly (or at all?) on Windows. You can download from here. As of this time the latest version is 2.12.10.
Your code should be portable between Linux and Windows. Alas, the binaries are not. ...
Edit: As commenters have pointed out, Mono does produce and use PE executables, though other issues may limit portability.

Can I use Sikuli as an Jython library in my project?

Sikuli is really cool, but it's working in its buildin Jython environment, the Sikuli IDE.
So I m wondering is it possible to import Sikuli as an external library to my Jython library? I saw from Sikuli's website that they have this Python module which provides all Sikuli actions like click and type. Here is the link: http://sikuli.org/documentation.shtml#doc/pythondoc-python.edu.mit.csail.uid.Sikuli.html
I have tried importing the skiuli-script.jar and add the skiuli-script/Lib to the PYTHONPATH. Then in my spike.py script, I try to do this:
import python.edu.mit.csail.uid.Sikuli
capture() #enter to screen capture mode
then when execute the script, I got this error:
java.lang.UnsatisfiedLinkError: java.lang.UnsatisfiedLinkError: /eclipse_3.4.2/workspace/Jython/src/tmplib/libVDictProxy.jnilib: no suitable image found. Did find: /eclipse_3.4.2/workspace/Jython/src/tmplib/libVDictProxy.jnilib: no matching architecture in universal wrapper
I m using Jython 2.2.1 and Mac 10.6.2 (32-bit mode). I have also set to use 32-bit mode first in Java Preference.
I tested it with jython 2.5.1 on win32:
I have to include the win32 dir in the PATH
on your mac installation you have to add the templib Directory to your path
see the sikuli-script.sh
sikuliscript is build to run with jython 2.5.x.
a 2.5 jython is included in the sikuli-script.jar
the test-script :
import python.edu.mit.csail.uid.Sikuli as Sikuli
Sikuli.capture() #enter to screen capture mode
putting it all together i think the answer is :
YES