Giter Club home page Giter Club logo

Comments (15)

SavageTiger avatar SavageTiger commented on August 23, 2024

After setting cache location, do you see the path you set in the error message?

from php-htmldiff.

AroundtheGlobe avatar AroundtheGlobe commented on August 23, 2024

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.

SavageTiger avatar SavageTiger commented on August 23, 2024

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.

AroundtheGlobe avatar AroundtheGlobe commented on August 23, 2024

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.

SavageTiger avatar SavageTiger commented on August 23, 2024

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.

AroundtheGlobe avatar AroundtheGlobe commented on August 23, 2024

Only the content of <article class="post-content">

from php-htmldiff.

SavageTiger avatar SavageTiger commented on August 23, 2024

I have created some testing fixtures based on that page

fixtures.zip

The performance on my local machine was not to bad, so not sure what the issue is.

Screenshot from 2019-04-16 23-00-03

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.

SavageTiger avatar SavageTiger commented on August 23, 2024

@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.

AroundtheGlobe avatar AroundtheGlobe commented on August 23, 2024

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.

SavageTiger avatar SavageTiger commented on August 23, 2024

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.

AroundtheGlobe avatar AroundtheGlobe commented on August 23, 2024

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.

AroundtheGlobe avatar AroundtheGlobe commented on August 23, 2024

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.

AroundtheGlobe avatar AroundtheGlobe commented on August 23, 2024

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.

SavageTiger avatar SavageTiger commented on August 23, 2024

@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.

jschroed91 avatar jschroed91 commented on August 23, 2024

Thanks for your help here @SavageTiger !

from php-htmldiff.

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.