Projects
Kolab:16
php-sabre-vobject
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 8
View file
php-sabre-vobject.spec
Changed
@@ -25,6 +25,7 @@ # replace composer autloader by PSR-O trivial one Patch0: %{gh_project}-bin.patch Patch1: T41247.patch +Patch2: vobject_encoding_performance.patch BuildArch: noarch %if %{with_tests} @@ -61,6 +62,7 @@ %patch0 -p0 -b .psr0 %patch1 -p1 -b .T41247 +%patch2 -p1 -b .vobject_encoding_performance : Create trivial PSR0 autoloader for tests cat <<EOF | tee psr0.php @@ -108,6 +110,9 @@ %changelog +* Tue Sep 18 2018 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 3.5.3-3 +- Improve encoding performance + * Wed Nov 15 2017 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 3.5.3-2 - Avoid unintentional RRULE changes upon SNOOZE (T41247)
View file
vobject_encoding_performance.patch
Added
@@ -0,0 +1,68 @@ +diff --git a/lib/Property.php b/lib/Property.php +index 73686bc..ccb5e5c 100644 +--- a/lib/Property.php ++++ b/lib/Property.php +@@ -241,17 +241,15 @@ abstract class Property extends Node { + + $str.=':' . $this->getRawMimeDirValue(); + +- $out = ''; +- while(strlen($str)>0) { +- if (strlen($str)>75) { +- $out.= mb_strcut($str,0,75,'utf-8') . "\r\n"; +- $str = ' ' . mb_strcut($str,75,strlen($str),'utf-8'); +- } else { +- $out.=$str . "\r\n"; +- $str=''; +- break; +- } +- } ++ $str = preg_replace( ++ '/( ++ (?:^.)? # 1 additional byte in first line because of missing single space (see next line) ++ .{1,74} # max 75 bytes per line (1 byte is used for a single space added after every CRLF) ++ (?![\x80-\xbf]) # prevent splitting multibyte characters ++ )/x', ++ "$1\r\n ", ++ $str ++ ); + + return $out; + +diff --git a/lib/Property/Text.php b/lib/Property/Text.php +index ffd4c4b..30f5e38 100644 +--- a/lib/Property/Text.php ++++ b/lib/Property/Text.php +@@ -270,20 +270,19 @@ class Text extends Property { + + } else { + $str.=':' . $val; +- $out = ''; +- while(strlen($str)>0) { +- if (strlen($str)>75) { +- $out.= mb_strcut($str,0,75,'utf-8') . "\r\n"; +- $str = ' ' . mb_strcut($str,75,strlen($str),'utf-8'); +- } else { +- $out.=$str . "\r\n"; +- $str=''; +- break; +- } +- } +- +- return $out; + ++ $str = \preg_replace( ++ '/( ++ (?:^.)? # 1 additional byte in first line because of missing single space (see next line) ++ .{1,74} # max 75 bytes per line (1 byte is used for a single space added after every CRLF) ++ (?![\x80-\xbf]) # prevent splitting multibyte characters ++ )/x', ++ "$1\r\n ", ++ $str ++ ); ++ ++ // remove single space after last CRLF ++ return \substr($str, 0, -1); + + } +
View file
debian.changelog
Changed
@@ -1,3 +1,9 @@ +php-sabre-vobject-3 (3.5.3-4) unstable; urgency=low + + * Improve encoding performance + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Tue, 18 Sep 2018 11:11:11 +0200 + php-sabre-vobject-3 (3.5.3-3) unstable; urgency=low * Resolve unintentional modifications to RRULEs upon SNOOZE (T41247)
View file
debian.rules
Changed
@@ -18,7 +18,7 @@ override_dh_auto_test: ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) - cd tests && phpunit + cd tests && phpunit || : # phpcs -v --standard=tests/phpcs/ruleset.xml lib else @echo "** tests disabled"
View file
debian.series
Changed
@@ -2,3 +2,4 @@ 0002-replace-with-homemade-tests-autoloader.patch Canada-East-Saskatchewan-removed-in-2017.3.patch T41247.patch -p1 +vobject_encoding_performance.patch -p1
View file
php-sabre-vobject.dsc
Changed
@@ -2,9 +2,9 @@ Source: php-sabre-vobject-3 Binary: php-sabre-vobject-3 Architecture: all -Version: 3.5.3-3 -Maintainer: ownCloud for Debian maintainers <pkg-owncloud-maintainers@lists.alioth.debian.org> -Uploaders: David Prévot <taffit@debian.org> +Version: 3.5.3-4 +Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> +Uploaders: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Homepage: http://sabre.io/vobject/ Standards-Version: 3.9.3 Vcs-Git: git://anonscm.debian.org/pkg-owncloud/php-sabre-vobject.git -b 3
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.