Comments (15)
After setting cache location, do you see the path you set in the error message?
from php-htmldiff.
The message above was the only message I've got. I had composer download and update all files today and it seems the problem is solved now.
The 5.500 word HTML diff still takes a long time (longer than a normal user would wait). When I wait for 400 sec (or 6.5 minutes) I am now able to to a diff without any errors.
from php-htmldiff.
I am not sure why I takes 7 minutes, one of the things that I know can take up loads of time is inline images (base64 encoded src tags). Also I advice you to make sure you run at least version 7 of PHP. I might be able to tell you why your html diff is slow if you can provide the data-set.
from php-htmldiff.
This is the text I try to compare (with an older / different version) https://www.aroundtheglobe.nl/reizen/duitsland/berlijn-si7161.html
It's without the encoded src tags and I am using php 7.1.x on the server so that should be okay. Maybe something else is slowing it down in my (html) code?
from php-htmldiff.
Just to be clear, are you literally compairing the source of the entire page html (including all the stuff like menu's etc?) or just the content of <article class="post-content">
for example?
from php-htmldiff.
Only the content of <article class="post-content">
from php-htmldiff.
I have created some testing fixtures based on that page
The performance on my local machine was not to bad, so not sure what the issue is.
Not sure what your server specs are, I run the test on a "Core i7-4790K CPU @ 4.60GHz"
If you want to test this yourself, checkout the vendor library, install using composer, overwrite the html pages from the zip in the directory /tests/fixtures/Performance
and run vendor/phpunit/phpunit/phpunit --group=performance
from the root of the library folder.
from php-htmldiff.
@jschroed91 I think we can close this issue, since the original issue seems invalid, and the performance issue is not really applicable to this specific ticket.
from php-htmldiff.
I will try to have a look today to test and see how it performs on the main server (vs dev server). The dev server is a Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz
from php-htmldiff.
I will try to have a look today to test and see how it performs on the main server (vs dev server). The dev server is a Intel(R) Core(TM) i7 CPU 950 @ 3.07GHz
According to user bench, the 950 has around 35% of the performance per core of a 4790, plus there is clock difference, so what would we expect on the 950, around 60 seconds maybe?, ignoring memory speed differences. Not really scientific, but not sure if 400 seconds makes sense, don't think so.
from php-htmldiff.
After uploading everything to the main server I got the same error again.
/var/www/[mysite]/vendor/ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer not writable, please chmod to 777
the htmldiff code is still set the same as above.
from php-htmldiff.
To answer this question:
After setting cache location, do you see the path you set in the error message?
No, I don't see the path I've set in the error message, but tI assume the default path of HTMLPurifier: /ezyang/htmlpurifier/library/HTMLPurifier/DefinitionCache/Serializer
from php-htmldiff.
I managed to solve the problem, but I can't explain what caused it. I use composer on my pc to get the latest files and update the composer pachages. When I compared the version of the vendor files / caxy files on my development server which at one point started to work with the live it seemed a few directories and files where missing. Uploading the files/directories solved the problem.
The missing files in my vendor dir where:
/vendor_path/caxy/lib/Caxy/HtmlDiff/ListDiffNew.php
In the ezyang package some directories where missing:
/vendor_path/ezyang/htmlPurifier/library/DefinitionCache/Serializer In this directory the two directories HTML and URI where missing.
Uploading the files / directories solved the caching problem and comparing the HTML text above takes about 15 seconds on the live server which is acceptable.
Thank you @SavageTiger for all your support!
from php-htmldiff.
@AroundtheGlobe Sorry for the late response, I was a bit busy. Happy that the issue is solved though, I think 15 seconds as what is about to be expected for a text of that size.
cc @jschroed91
from php-htmldiff.
Thanks for your help here @SavageTiger !
from php-htmldiff.
Related Issues (20)
- Lists being marked as changed when the output is 100% the same. HOT 3
- Some diffs take far too long even with no multi-byte HOT 10
- Individual Element Styling is Removed HOT 1
- Warning DOMDocument::loadHTML(): Unexpected end tag : strong HOT 3
- How about some sample output to demonstrate before downloading? HOT 1
- Spaces near quotes etc. HOT 5
- Diff fails on image as a link inside a table
- no iframes in result HOT 2
- nested/unclosed tags on attribute differences
- Add placeholder for the HTML5 <picture> element.
- HTML entities are not kept intact, leading to invalid HTML
- Offer diff by characters
- Warning: DOMDocument::loadHTML(): Unexpected end tag : u in Entity HOT 2
- Rowspan Colspan issue in differense
- Handling HTML entities via mbstring is deprecated in PHP 8.2 HOT 3
- TableDiff: Deprecated function mb_convert_encoding() in PHP 8.2
- list flattening
- You're amazing ❤
- Problem with Match in PHP8 HOT 4
- How to ignore changes in an attribute? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-htmldiff.