Skip to content

Commit c655dbc

Browse files
committed
0.4.4
1 parent 85a6690 commit c655dbc

5 files changed

Lines changed: 315 additions & 230 deletions

File tree

benchmark.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"https://glineq.blogspot.com/feeds/posts/default",
1212
"https://stml.tumblr.com/rss",
1313
"http://feeds.feedburner.com/mishadoff",
14-
"https://lisacharlottemuth.com/atom.xml",
14+
"https://lisacharlottemuth.com/atom.xml",
1515
"https://emacsninja.com/feed.atom",
1616
"http://causality.cs.ucla.edu/blog/index.php/feed/",
1717
"https://blog.railsapps.org/rss",
@@ -77,7 +77,7 @@
7777
"https://anteru.net/rss.xml",
7878
"https://blog.drewolson.org/index.xml",
7979
"https://blog.noredink.com/rss",
80-
"https://glasspetalsmoke.blogspot.com/feeds/posts/default"
80+
"https://glasspetalsmoke.blogspot.com/feeds/posts/default",
8181
]
8282

8383

@@ -98,8 +98,8 @@ def test_parsers():
9898
total_fp_time = 0
9999
total_ffp_entries = 0
100100
total_fp_entries = 0
101-
fp_time=0
102-
101+
fp_time = 0
102+
103103
successful_feeds = 0
104104

105105
for url in feeds:
@@ -113,7 +113,7 @@ def test_parsers():
113113
start_time = time.perf_counter()
114114
feed = fastfeedparser.parse(content)
115115
ffp_time = time.perf_counter() - start_time
116-
total_ffp_entries+=len(feed.entries)
116+
total_ffp_entries += len(feed.entries)
117117
print(f"FastFeedParser: {len(feed.entries)} entries in {ffp_time:.3f}s")
118118
except Exception as e:
119119
ffp_time = time.perf_counter() - start_time
@@ -124,14 +124,14 @@ def test_parsers():
124124
start_time = time.perf_counter()
125125
feed = feedparser.parse(content)
126126
fp_time = time.perf_counter() - start_time
127-
total_fp_entries+=len(feed.entries)
128-
print(f"Feedparser: {len(feed.entries)} entries in {fp_time:.3f}s")
127+
total_fp_entries += len(feed.entries)
128+
print(f"Feedparser: {len(feed.entries)} entries in {fp_time:.3f}s")
129129
except Exception as e:
130130
fp_time = time.perf_counter() - start_time
131131
print(f"Feedparser failed: {e}")
132132

133133
total_ffp_time += ffp_time
134-
total_fp_time += fp_time
134+
total_fp_time += fp_time
135135

136136
print(f"Speedup: {fp_time/ffp_time:.1f}x")
137137
if ffp_time > 0 and fp_time > 0:

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = fastfeedparser
33
version = 0.4.4
44
author = Vladimir Prelovac
55
author_email = vlad@kagi.com
6-
description = High performance RSS, Atom and RDF parser in Python
6+
description = High performance RSS, Atom, JSON and RDF feed parser in Python
77
long_description = file: README.md
88
long_description_content_type = text/markdown
99
url = https://github.com/kagisearch/fastfeedparser

src/fastfeedparser/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from .main import parse, FastFeedParserDict
22

33
__version__ = "0.1.0"
4-
__all__ = ['parse', 'FastFeedParserDict']
4+
__all__ = ["parse", "FastFeedParserDict"]

0 commit comments

Comments
 (0)